freebsd-skq/etc/rc.d/mountcritlocal
mtm 9308cac661 There's no need to announce that we're mounting local filesystems when
running in quiet mode since if we fail to mount any of them the boot
process gets interrupted.
2008-07-05 15:19:58 +00:00

55 lines
962 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: mountcritlocal
# REQUIRE: root
# KEYWORD: nojail
. /etc/rc.subr
name="mountcritlocal"
start_cmd="mountcritlocal_start"
stop_cmd=":"
mountcritlocal_start()
{
local err
# Set up the list of network filesystem types for which mounting
# should be delayed until after network initialization.
case ${extra_netfs_types} in
[Nn][Oo])
;;
*)
netfs_types="${netfs_types} ${extra_netfs_types}"
;;
esac
# Mount everything except nfs filesystems.
[ -z "${rc_quiet}" ] && echo -n 'Mounting local file systems:'
mount_excludes='no'
for i in ${netfs_types}; do
fstype=${i%:*}
mount_excludes="${mount_excludes}${fstype},"
done
mount_excludes=${mount_excludes%,}
mount -a -t ${mount_excludes}
err=$?
[ -z "${rc_quiet}" ] && echo '.'
case ${err} in
0)
;;
*)
echo 'Mounting /etc/fstab filesystems failed,' \
' startup aborted'
stop_boot true
;;
esac
}
load_rc_config $name
run_rc_command "$1"