OXIESEC PANEL
- Current Dir:
/
/
snap
/
core
/
17200
/
etc
/
rc0.d
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/06/2024 02:31:58 PM
rwxr-xr-x
📄
K01cgmanager
3.48 KB
09/14/2015 10:15:39 PM
rwxr-xr-x
📄
K01cgproxy
3.28 KB
09/14/2015 10:15:39 PM
rwxr-xr-x
📄
K01resolvconf
4.05 KB
11/29/2017 06:26:46 PM
rwxr-xr-x
📄
K01ubuntu-fan
1.2 KB
10/28/2016 03:24:40 PM
rwxr-xr-x
📄
K01urandom
3.04 KB
01/19/2016 06:33:51 PM
rwxr-xr-x
📄
K02sendsigs
3.83 KB
01/19/2016 06:33:50 PM
rwxr-xr-x
📄
K03rsyslog
2.73 KB
02/03/2016 10:54:29 AM
rwxr-xr-x
📄
K04hwclock.sh
3.72 KB
03/12/2016 03:14:57 PM
rwxr-xr-x
📄
K04umountnfs.sh
2.15 KB
01/19/2016 06:33:51 PM
rwxr-xr-x
📄
K05networking
4.66 KB
11/30/2016 05:16:19 PM
rwxr-xr-x
📄
K06umountfs
2.67 KB
01/19/2016 06:33:51 PM
rwxr-xr-x
📄
K07umountroot
1.83 KB
01/19/2016 06:33:51 PM
rwxr-xr-x
📄
K08halt
1.3 KB
01/19/2016 06:33:51 PM
rwxr-xr-x
📄
README
353 bytes
01/19/2016 06:33:50 PM
rw-r--r--
Editing: K06umountfs
Close
#! /bin/sh ### BEGIN INIT INFO # Provides: umountfs # Required-Start: # Required-Stop: umountroot # Default-Start: # Default-Stop: 0 6 # Short-Description: Turn off swap and unmount all local file systems. # Description: ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/init/vars.sh . /lib/lsb/init-functions umask 022 do_stop () { PROTECTED_MOUNTS="$(sed -n ':a;/^[^ ]* \/ /!{H;n;ba};{H;s/.*//;x;s/\n//;p}' /proc/mounts)" WEAK_MTPTS="" # be gentle, don't use force REG_MTPTS="" TMPFS_MTPTS="" while read -r DEV MTPT FSTYPE REST do echo "$PROTECTED_MOUNTS" | grep -qs "^$DEV $MTPT " && continue case "$MTPT" in /|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/*|/run|/run/*|/dev/vcs) continue ;; esac case "$FSTYPE" in proc|procfs|linprocfs|sysfs|usbfs|usbdevfs|devpts) continue ;; tmpfs) TMPFS_MTPTS="$MTPT $TMPFS_MTPTS" ;; *) if echo "$PROTECTED_MOUNTS" | grep -qs "^$DEV "; then WEAK_MTPTS="$MTPT $WEAK_MTPTS" else REG_MTPTS="$MTPT $REG_MTPTS" fi ;; esac done < /proc/mounts # # Make sure tmpfs file systems are umounted before turning off # swap, to avoid running out of memory if the tmpfs filesystems # use a lot of space. # if [ "$TMPFS_MTPTS" ] then if [ "$VERBOSE" = no ] then log_action_begin_msg "Unmounting temporary filesystems" fstab-decode umount $TMPFS_MTPTS log_action_end_msg $? else log_daemon_msg "Will now unmount temporary filesystems" fstab-decode umount -v $TMPFS_MTPTS log_end_msg $? fi fi # # Deactivate swap # if [ "$VERBOSE" = no ] then log_action_begin_msg "Deactivating swap" swapoff -a >/dev/null log_action_end_msg $? else log_daemon_msg "Will now deactivate swap" swapoff -a -v log_end_msg $? fi # # Unmount local filesystems # if [ "$WEAK_MTPTS" ]; then # Do not use -f umount option for WEAK_MTPTS if [ "$VERBOSE" = no ] then log_action_begin_msg "Unmounting weak filesystems" fstab-decode umount -r -d $WEAK_MTPTS log_action_end_msg $? else log_daemon_msg "Will now unmount weak filesystems" fstab-decode umount -v -r -d $WEAK_MTPTS log_end_msg $? fi fi if [ "$REG_MTPTS" ] then if [ "$VERBOSE" = no ] then log_action_begin_msg "Unmounting local filesystems" fstab-decode umount -f -r -d $REG_MTPTS log_action_end_msg $? else log_daemon_msg "Will now unmount local filesystems" fstab-decode umount -f -v -r -d $REG_MTPTS log_end_msg $? fi fi } case "$1" in start|status) # No-op ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) do_stop ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac :