From 2915cbb35be51f51eab0ffd493b2163188dd3444 Mon Sep 17 00:00:00 2001 From: "Carl D. Roth" Date: Wed, 11 May 2016 13:56:40 -0700 Subject: [PATCH] Minor tmpfs fixes - don't unmount /tmp - fix bind-mount target so chroot can see the installer file --- builds/any/installer/new-hotness/installer.sh.in | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/builds/any/installer/new-hotness/installer.sh.in b/builds/any/installer/new-hotness/installer.sh.in index b7ada262..050290bc 100644 --- a/builds/any/installer/new-hotness/installer.sh.in +++ b/builds/any/installer/new-hotness/installer.sh.in @@ -190,7 +190,7 @@ installer_umount() { tdir=${TMPDIR-"/tmp"} for mpt in $(cat /proc/mounts | cut -d' ' -f2 | sort -r); do case "$mpt" in - "$tdir"|"$tdir"/*) + "$tdir"/*) installer_say "Unmounting $mpt" umount "$mpt" ;; @@ -215,16 +215,18 @@ installer_umount() { installer_say "Remounting $installer_tmpfs with options $installer_tmpfs_opts" mount -o remount,$installer_tmpfs_opts $installer_tmpfs - else + elif test "$installer_tmpfs" != "/tmp"; then # else unmount if still mounted installer_say "Unmounting $installer_tmpfs" umount "$installer_tmpfs" + rmdir "$installer_tmpfs" fi fi + fi cd $cwd || : @@ -428,9 +430,9 @@ case "$installer_zip" in echo "installer_zip=\"${installer_zip##*/}\"" >> "${rootdir}/etc/onl/installer.conf" ;; *) - zf=$(mktemp "$installer_dir/installer-zip-XXXXXX") - installer_say "Exposing installer archive as $zf" - mount -o bind "$installer_zip" $zf + zf=$(mktemp "$rootdir/mnt/installer/installer-zip-XXXXXX") + installer_say "Exposing installer archive $installer_zip as $zf" + mount --bind "$installer_zip" $zf echo "installer_zip=\"${zf##*/}\"" >> "${rootdir}/etc/onl/installer.conf" ;; esac