mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
5c0612b199
at worst. On a heavily loaded server it will give the fs a chance to do its business without the axe hanging over its head. Submitted by: ivoras
55 lines
983 B
Bash
Executable File
55 lines
983 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: mountcritlocal
|
|
# REQUIRE: root hostid_save mdconfig
|
|
# KEYWORD: nojail shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="mountcritlocal"
|
|
start_cmd="mountcritlocal_start"
|
|
stop_cmd=sync
|
|
|
|
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.
|
|
check_startmsgs && 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=$?
|
|
check_startmsgs && 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"
|