mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-23 10:14:55 +00:00
If we don't have /usr/sbin/mtree, try to mount /usr. We're only likely
to hit this case when /usr is remote and thus hasn't been mounted (since you're supposed to have /var before mounting remote file systems). Normal machines that don't have a /var for some reason will have /usr already available because it's local.
This commit is contained in:
parent
e12405280b
commit
ed9e8cc512
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142965
13
etc/rc.d/var
13
etc/rc.d/var
|
@ -83,11 +83,20 @@ case "${populate_var}" in
|
|||
*)
|
||||
if [ -d /var/run -a -d /var/db -a -d /var/empty ] ; then
|
||||
true
|
||||
elif [ ! -x /usr/sbin/mtree ] ; then
|
||||
false
|
||||
elif [ -x /usr/sbin/mtree ] ; then
|
||||
_populate_var
|
||||
else
|
||||
# We need mtree to populate /var so try mounting /usr.
|
||||
# If this does not work, we can not boot so it is OK to
|
||||
# try to mount out of order.
|
||||
mount /usr
|
||||
if [ ! -x /usr/sbin/mtree ] ; then
|
||||
exit 1
|
||||
else
|
||||
_populate_var
|
||||
fi
|
||||
else
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue