HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, 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_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/share/initramfs-tools/scripts/nfs
# NFS filesystem mounting			-*- shell-script -*-

# FIXME This needs error checking

nfs_top()
{
	if [ "${nfs_top_used}" != "yes" ]; then
		[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top"
		run_scripts /scripts/nfs-top
		[ "$quiet" != "y" ] && log_end_msg
	fi
	nfs_top_used=yes
}

nfs_premount()
{
	if [ "${nfs_premount_used}" != "yes" ]; then
		[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-premount"
		run_scripts /scripts/nfs-premount
		[ "$quiet" != "y" ] && log_end_msg
	fi
	nfs_premount_used=yes
}

nfs_bottom()
{
	if [ "${nfs_premount_used}" = "yes" ] || [ "${nfs_top_used}" = "yes" ]; then
		[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom"
		run_scripts /scripts/nfs-bottom
		[ "$quiet" != "y" ] && log_end_msg
	fi
	nfs_premount_used=no
	nfs_top_used=no
}

# parse nfs bootargs and mount nfs
nfs_mount_root_impl()
{
	configure_networking

	# get nfs root from dhcp
	if [ "x${NFSROOT}" = "xauto" ]; then
		# check if server ip is part of dhcp root-path
		if [ "${ROOTPATH#*:}" = "${ROOTPATH}" ]; then
			NFSROOT=${ROOTSERVER}:${ROOTPATH}
		else
			NFSROOT=${ROOTPATH}
		fi

	# nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
	elif [ -n "${NFSROOT}" ]; then
		# nfs options are an optional arg
		if [ "${NFSROOT#*,}" != "${NFSROOT}" ]; then
			NFSOPTS="-o ${NFSROOT#*,}"
		fi
		NFSROOT=${NFSROOT%%,*}
		if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then
			NFSROOT=${ROOTSERVER}:${NFSROOT}
		fi
	fi

	if [ -z "${NFSOPTS}" ]; then
		NFSOPTS="-o retrans=10"
	fi

	nfs_premount

	if [ ${readonly} = y ]; then
		roflag="-o ro"
	else
		roflag="-o rw"
	fi

	nfsmount -o nolock ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt}
}

# NFS root mounting
nfs_mount_root()
{
	nfs_top

	modprobe nfs
	# For DHCP
	modprobe af_packet

	wait_for_udev 10

	# Default delay is around 180s
	delay=${ROOTDELAY:-180}

	# loop until nfsmount succeeds
	nfs_mount_root_impl
	ret=$?
	nfs_retry_count=0
	while [ ${nfs_retry_count} -lt ${delay} ] \
		&& [ $ret -ne 0 ] ; do
		[ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount"
		/bin/sleep 1
		nfs_mount_root_impl
		ret=$?
		nfs_retry_count=$(( ${nfs_retry_count} + 1 ))
		[ "$quiet" != "y" ] && log_end_msg
	done
}

nfs_mount_fs_impl()
{
	configure_networking

	if [ -z "${NFSOPTS}" ]; then
		NFSOPTS="-o retrans=10"
	fi

	nfs_premount

	if [ ${readonly} = y ]; then
		roflag="-o ro"
	else
		roflag="-o rw"
	fi

	read_fstab_entry "$1"

	nfsmount ${roflag} ${NFSOPTS} -o "${MNT_OPTS}" "$MNT_FSNAME" "${rootmnt}${MNT_DIR}"
}

nfs_mount_fs()
{
	nfs_top

	modprobe nfs
	# For DHCP
	modprobe af_packet

	wait_for_udev 10

	# Default delay is around 180s
	delay=${ROOTDELAY:-180}

	# Don't loop here; we can't sanely check if it worked like for
	# the rootfs or /etc.
	nfs_mount_fs_impl "$1"
}

mountroot()
{
	nfs_mount_root
}

mount_top()
{
	# Note, also called directly in case it's overridden.
	nfs_top
}

mount_premount()
{
	# Note, also called directly in case it's overridden.
	nfs_premount
}

mount_bottom()
{
	# Note, also called directly in case it's overridden.
	nfs_bottom
}