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:
Brooks Davis 2005-03-02 00:58:05 +00:00
parent e12405280b
commit ed9e8cc512
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142965

View file

@ -83,10 +83,19 @@ 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
else
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