vp-build/templates/initscripts/files/rc.d/mountfs

34 lines
690 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# PROVIDE: mountfs
# REQUIRE: SERVERS checkfs
# BEFORE: NETWORKING
$_rc_subr_loaded . /etc/rc.subr
name="mountfs"
start_cmd="mountfs_start"
stop_cmd=":"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs"
NETFS="$NETFS,noshfs,nofuse,nofuseblk"
mountfs_start()
{
echo "Mounting local filesystems."
mount -n -o remount,rw /
rm -f /etc/mtab*
# make sure / gets written to /etc/mtab
mount -o remount,rw /
# Write /proc, /sys and /dev to /etc/mtab
if [ -e /proc/mounts ]; then
grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts \
>> /etc/mtab
fi
# now mount all the local filesystems
mount -a -t $NETFS
}
load_rc_config $name
run_rc_command "$1"