1eae783464
employ a more generic solution, and use it in the individual rc.d scripts that also have an $rc_quiet test: 1. Add check_startmsgs() to rc.subr. 2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute variations of [ -z "$rc_quiet" ] with check_startmsgs 3. In savecore add a trailing '.' to the end of the message to make it more consistent with other scripts. 4. In newsyslog remove a : before the terminal '.' since we do not expect there to be anything printed out in between to make it more consistent. 5. In the following scripts change "quotes" to 'quotes' where no variables exist in the message: savecore pf newsyslog 6. In the following scripts substitute if/then/fi for the simpler (and more consistent) check_startmsgs &&: faith stf 7. In the following scripts separate the "Starting foo:" from the terminal '.' to make them more consistent: moused hostname pf 8. In nfsclient move the message to its own line to avoid a style bug 9. In pf rc_quiet does not apply to the _stop method, so remove the test there. 10. In motd add 'quotes' around the terminal '.' for consistency
55 lines
952 B
Bash
Executable File
55 lines
952 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.
|
|
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"
|