vp-build/templates/initscripts/files/rc.d/mountfs
Juan RP a3190ec48c initscripts: misc changes, bump to 2009-03.
--HG--
extra : convert_revision : 97fb9127cb91659331f1574a19a8871fed30a0ab
2009-03-26 10:07:50 +01:00

35 lines
710 B
Bash
Executable File

#!/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 -n "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
echo "done."
}
load_rc_config $name
run_rc_command "$1"