2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: mountcritlocal
|
2003-12-14 13:36:36 +00:00
|
|
|
# REQUIRE: root
|
2004-10-07 13:55:26 +00:00
|
|
|
# KEYWORD: nojail
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="mountcritlocal"
|
|
|
|
start_cmd="mountcritlocal_start"
|
|
|
|
stop_cmd=":"
|
|
|
|
|
|
|
|
mountcritlocal_start()
|
|
|
|
{
|
2008-03-06 14:39:33 +00:00
|
|
|
local err
|
|
|
|
|
2004-01-17 10:40:45 +00:00
|
|
|
# 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}"
|
2002-06-13 22:14:37 +00:00
|
|
|
;;
|
2004-01-17 10:40:45 +00:00
|
|
|
esac
|
2002-06-13 22:14:37 +00:00
|
|
|
|
2004-01-17 10:40:45 +00:00
|
|
|
# Mount everything except nfs filesystems.
|
2009-10-10 22:17:03 +00:00
|
|
|
check_startmsgs && echo -n 'Mounting local file systems:'
|
2004-01-17 10:40:45 +00:00
|
|
|
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}
|
2008-03-06 14:39:33 +00:00
|
|
|
err=$?
|
2009-10-10 22:17:03 +00:00
|
|
|
check_startmsgs && echo '.'
|
2004-01-17 10:40:45 +00:00
|
|
|
|
2008-03-06 14:39:33 +00:00
|
|
|
case ${err} in
|
2004-01-17 10:40:45 +00:00
|
|
|
0)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo 'Mounting /etc/fstab filesystems failed,' \
|
|
|
|
' startup aborted'
|
2007-05-18 12:04:41 +00:00
|
|
|
stop_boot true
|
2002-06-13 22:14:37 +00:00
|
|
|
;;
|
|
|
|
esac
|
2001-06-16 07:16:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|