freebsd-dev/etc/rc.d/mountlate
Mike Makonnen f2e7477d21 The check for errors from the mount command did not work as intended
because another command (echo) is executed between the mount command
and the check.

Reported by: Sergey Baturov <sergey@toor.org.ru>
MFC after: 2 weeks
2008-03-06 14:39:33 +00:00

40 lines
485 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()
{
local err
# Mount "late" filesystems.
echo -n 'Mounting late file systems:'
mount -a -l
err=$?
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"