mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
3d03791bb4
scripts in rc.d to stop rc(8) from booting into multi-user mode when a critical or severe error condition is encountered. o Modify scripts in etc/rc.d that already implemented this functionality independently. o Document it. [1] - This subroutine was implemented in FreeBSD in rc.d/fsck. I moved it to rc.subr(8). Our version differs slightly in that it takes an optional argument to stop the boot even if "autoboot" is not set. Obtained from: NetBSD MFC after: 2 weeks
37 lines
461 B
Bash
37 lines
461 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: mountlate
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: LOGIN
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="mountlate"
|
|
start_cmd="mountlate_start"
|
|
stop_cmd=":"
|
|
|
|
mountlate_start()
|
|
{
|
|
# Mount "late" filesystems.
|
|
echo -n 'Mounting late file systems:'
|
|
mount -a -l
|
|
echo '.'
|
|
|
|
case $? in
|
|
0)
|
|
;;
|
|
*)
|
|
echo 'Mounting /etc/fstab filesystems failed,' \
|
|
' startup aborted'
|
|
stop_boot true
|
|
;;
|
|
esac
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|