diff options
author | Renato Botelho <renato@netgate.com> | 2016-11-18 09:27:48 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-11-18 09:29:06 -0200 |
commit | 3ff4373553be154279e89c73ca3c534c3688ccd9 (patch) | |
tree | f84923c5662fbdd4b27c609b91c4412b271db3e0 /usr.sbin/bsdinstall/scripts | |
parent | 4f75af2bd00c47530f0e3f25b9efaff7f80a83f0 (diff) | |
download | FreeBSD-src-3ff4373553be154279e89c73ca3c534c3688ccd9.zip FreeBSD-src-3ff4373553be154279e89c73ca3c534c3688ccd9.tar.gz |
Umount distdir after use
Diffstat (limited to 'usr.sbin/bsdinstall/scripts')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/auto | 8 |
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 |