Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=36cc90ef49100ba7acd8567201a9be1edd82688d

commit 36cc90ef49100ba7acd8567201a9be1edd82688d
Author: James Buren <[email protected]>
Date:   Sun Feb 17 22:34:06 2013 -0600

extend create-root to umount directories when done modifying the root path

diff --git a/new/create-root b/new/create-root
index b49fe09..239971c 100755
--- a/new/create-root
+++ b/new/create-root
@@ -50,3 +50,13 @@ chroot $ROOT sh -c "echo 'root:fwlive' | chpasswd"
cat > $ROOT/etc/hostname << EOF
fwlive
EOF
+
+# Unmount all paths mounted earlier.
+cp /proc/mounts mounts
+while read line; do
+       path=$(echo $line | cut -f 2 -d ' ')
+       if [ "$path" != "${path#$ROOT}" ]; then
+               umount $path
+       fi
+done < mounts
+rm -f mounts
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to