summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr.sbin/bsdinstall/scripts/auto8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
index 40fd48e..65fc553 100755
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -305,6 +305,7 @@ case "$PARTMODE" in
;;
esac
+unset mounted_nullfs
if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
WANT_DEBUG=
@@ -318,6 +319,7 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
if [ -d $BSDINSTALL_DISTDIR ]; then
DISTDIR_IS_UNIONFS=1
mount_nullfs -o union "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
+ mounted_nullfs=1
else
export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS"
export BSDINSTALL_DISTDIR="$BSDINSTALL_FETCHDEST"
@@ -370,6 +372,7 @@ if [ ! -z "$LOCAL_DISTRIBUTIONS" ]; then
if [ -d $BSDINSTALL_DISTDIR ]; then
DISTDIR_IS_UNIONFS=1
mount_nullfs -o union "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
+ mounted_nullfs=1
export BSDINSTALL_DISTDIR="$BSDINSTALL_FETCHDEST"
fi
env DISTRIBUTIONS="$LOCAL_DISTRIBUTIONS" \
@@ -380,6 +383,11 @@ fi
bsdinstall checksum || error "Distribution checksum failed"
bsdinstall distextract || error "Distribution extract failed"
+
+if [ -n "${mounted_nullfs}" ]; then
+ umount $BSDINSTALL_DISTDIR
+fi
+
if [ -f /root/factory.sh ]; then
sh /root/factory.sh || error "System configuration failed"
fi
OpenPOWER on IntegriCloud