Server IP : 127.0.0.2 / Your IP : 18.119.29.99 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/rcS.d/ |
Upload File : |
#! /bin/sh ### BEGIN INIT INFO # Provides: mountnfs # Required-Start: $local_fs # Required-Stop: # Should-Start: $network $portmap nfs-common udev-mtab # Default-Start: S # Default-Stop: # Short-Description: Wait for network file systems to be mounted # Description: Network file systems are mounted by # /etc/network/if-up.d/mountnfs in the background # when interfaces are brought up; this script waits # for them to be mounted before carrying on. ### END INIT INFO . /lib/lsb/init-functions . /lib/init/vars.sh . /lib/init/mount-functions.sh do_wait_async_mount() { # Read through fstab line by line. If it is NFS, set the flag # for mounting NFS file systems. If any NFS partition is found # then wait around for it. waitnfs= for file in "$(eval ls $(fstab_files))"; do if [ -f "$file" ]; then while read DEV MTPT FSTYPE OPTS REST; do case "$DEV" in ""|\#*) continue ;; esac case "$OPTS" in noauto|*,noauto|noauto,*|*,noauto,*) continue ;; esac case "$FSTYPE" in nfs|nfs4|smbfs|cifs|coda|ncp|ncpfs|ocfs2|gfs|ceph) ;; *) continue ;; esac case "$MTPT" in /usr/local|/usr/local/*) ;; /usr|/usr/*) waitnfs="$waitnfs $MTPT" ;; /var|/var/*) waitnfs="$waitnfs $MTPT" ;; esac done < "$file" fi done # Wait for each path, the timeout is for all of them as that's # really the maximum time we have to wait anyway TIMEOUT=900 for mountpt in $waitnfs; do log_action_begin_msg "Waiting for $mountpt" while ! mountpoint -q $mountpt; do sleep 0.1 TIMEOUT=$(( $TIMEOUT - 1 )) if [ $TIMEOUT -le 0 ]; then log_action_end_msg 1 break fi done if [ $TIMEOUT -gt 0 ]; then log_action_end_msg 0 fi done } case "$1" in start) # Using 'no !=' instead of 'yes =' to make sure async nfs # mounting is the default even without a value in # /etc/default/rcS if [ no != "$ASYNCMOUNTNFS" ] ; then do_wait_async_mount else FROMINITD=yes /etc/network/if-up.d/mountnfs fi ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop|status) # No-op ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac :