Server IP : 85.214.239.14 / Your IP : 3.129.67.32 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/root/etc/rc0.d/ |
Upload File : |
#! /bin/sh ### BEGIN INIT INFO # Provides: umountnfs # Required-Start: # Required-Stop: umountfs # Should-Stop: $network $portmap nfs-common # Default-Start: # Default-Stop: 0 6 # Short-Description: Unmount all network filesystems except the root fs. # Description: Also unmounts all virtual filesystems (proc, # devpts, usbfs, sysfs) that are not mounted at the # top level. ### END INIT INFO PATH=/usr/sbin:/usr/bin:/sbin:/bin KERNEL="$(uname -s)" RELEASE="$(uname -r)" . /lib/init/vars.sh . /lib/lsb/init-functions case "${KERNEL}:${RELEASE}" in Linux:[01].*|Linux:2.[01].*) FLAGS="" ;; Linux:2.[23].*|Linux:2.4.?|Linux:2.4.?-*|Linux:2.4.10|Linux:2.4.10-*) FLAGS="-f" ;; *) FLAGS="-f -l" ;; esac do_stop () { # Write a reboot record to /var/log/wtmp before unmounting halt -w # Remove bootclean flag files (precaution against symlink attacks) rm -f /tmp/.clean /run/.clean /run/lock/.clean # # Make list of points to unmount in reverse order of their creation # DIRS="" while read -r DEV MTPT FSTYPE OPTS REST do case "$MTPT" in /|/proc|/dev|/dev/pts|/dev/shm|/proc/*|/sys|/run|/run/*) continue ;; esac case "$FSTYPE" in nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ceph) DIRS="$MTPT $DIRS" ;; proc|procfs|linprocfs|devpts|usbfs|usbdevfs|sysfs) DIRS="$MTPT $DIRS" ;; esac case "$OPTS" in _netdev|*,_netdev|_netdev,*|*,_netdev,*) case "$FSTYPE" in ocfs2|gfs) ;; *) DIRS="$MTPT $DIRS" ;; esac ;; esac done < /etc/mtab if [ "$DIRS" ] then [ "$VERBOSE" = no ] || log_action_begin_msg "Unmounting remote and non-toplevel virtual filesystems" fstab-decode umount $FLAGS $DIRS ES=$? [ "$VERBOSE" = no ] || log_action_end_msg $ES fi # emit unmounted-remote-filesystems hook point so any upstart jobs # that support remote filesystems can be stopped if [ -x /sbin/initctl ]; then initctl --quiet emit unmounted-remote-filesystems 2>/dev/null || true 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: umountnfs.sh [start|stop]" >&2 exit 3 ;; esac :