mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
4b4f91707c
not be mounted unless the -l flag was specified. Add an rc script, mountlate, which basically runs 'mount -a -l'. It runs after DAEMON but before LOGIN. This is useful for things like loopback mounts, because mountcritremote runs before mountd / nfsd (since /usr might be a remote file system), so an attempt to mount a loopback network file system in mountcritremote will fail. Also add a progress message to mountcritlocal, for the sake of symmetry with similar messages in mountcritremote and mountlate. Reviewed by: freebsd-rc MFC after: 3 weeks
37 lines
460 B
Bash
37 lines
460 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'
|
|
kill -QUIT $$
|
|
;;
|
|
esac
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|