xref: /freebsd/libexec/rc/rc.d/mountlate (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6# PROVIDE: mountlate
7# REQUIRE: DAEMON
8# BEFORE: LOGIN
9# KEYWORD: nojail
10
11. /etc/rc.subr
12
13name="mountlate"
14desc="Mount filesystems with \"late\" option from /etc/fstab"
15start_cmd="mountlate_start"
16stop_cmd=":"
17
18mountlate_start()
19{
20	local err latefs
21
22	# Mount "late" filesystems.
23	#
24	err=0
25	echo -n 'Mounting late filesystems:'
26	mount -a -L
27	err=$?
28	echo '.'
29
30	case ${err} in
31	0)
32		;;
33	*)
34		echo 'Mounting /etc/fstab filesystems failed,' \
35		    'startup aborted'
36		stop_boot true
37		;;
38	esac
39
40 	# If we booted a special kernel remove the record
41 	# so we will boot the default kernel next time.
42 	if [ -x /sbin/nextboot ]; then
43		/sbin/nextboot -D
44 	fi
45}
46
47load_rc_config $name
48run_rc_command "$1"
49