]> git.wh0rd.org Git - home.git/commitdiff
also mount /tmp and add a flag for adding more mounts
authorMike Frysinger <vapier@gentoo.org>
Mon, 5 Nov 2012 17:01:16 +0000 (12:01 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 5 Nov 2012 17:01:16 +0000 (12:01 -0500)
.bin/custom-chroot

index 7c576bb0109d991863791249022402c655c458c0..dcaeabc6bf03f25157efa62e16aaa57773174bc1 100755 (executable)
@@ -12,7 +12,7 @@ else
 fi
 unset UNSHARE
 
-mounts="proc sys dev dev/pts usr/portage usr/portage/distfiles"
+mounts="proc sys tmp dev dev/pts usr/portage usr/portage/distfiles"
 
 chroot=${0%/*}
 case ${chroot} in
@@ -35,10 +35,12 @@ do_umount() {
 
 while [[ -n $1 ]] ; do
        case $1 in
-               -u) do_umount ;;
-               -*) echo "unknown option $1"; exit 1 ;;
-               *)  break ;;
+       -u) do_umount ;;
+       -m) mounts+=" $2"; shift ;;
+       -*) echo "unknown option $1"; exit 1 ;;
+       *)  break ;;
        esac
+       shift
 done
 
 maybe_mount() {