[prev in list] [next in list] [prev in thread] [next in thread]
List: gobolinux-commits
Subject: [gobolinux-commits] r3242 - trunk/Scripts/bin
From: lucasvr () svn ! gobolinux ! org
Date: 2008-04-24 19:02:27
Message-ID: 20080424190227.727A381A7 () oakdale ! dreamhost ! com
[Download RAW message or body]
Author: lucasvr
Date: 2008-04-24 12:02:27 -0700 (Thu, 24 Apr 2008)
New Revision: 3242
Modified:
trunk/Scripts/bin/UnionSandbox
Log:
Do not 'rm -rf' if at least one mount point wasn't unmounted. Also, include /Files \
bindings in the unionfs bind-mount hack.
Modified: trunk/Scripts/bin/UnionSandbox
===================================================================
--- trunk/Scripts/bin/UnionSandbox 2008-04-24 19:00:11 UTC (rev 3241)
+++ trunk/Scripts/bin/UnionSandbox 2008-04-24 19:02:27 UTC (rev 3242)
@@ -72,18 +72,21 @@
# Clean up mountpoints
umount "$sandbox_mp/$goboStatus"
umount "$sandbox_mp/$goboDevices"
+ error=false
For_Each_Reverse mapmounts '
rhs=$(echo $each | cut -d= -f2)
- umount ${sandbox_mp}$rhs || echo "Error unmounting ${sandbox_mp}${rhs}"
+ umount ${sandbox_mp}$rhs || { echo "Error unmounting ${sandbox_mp}${rhs}"; \
error=true; } '
For_Each_Reverse bindmounts '
- umount ${sandbox_mp}${each} || echo "Error unmounting ${sandbox_mp}${each}"
+ umount ${sandbox_mp}${each} || { echo "Error unmounting \
${sandbox_mp}${each}"; error=true; } '
For_Each_Reverse unionSandbox '
- Union_Umount ${unionbackend} ${sandbox_mp}${each} || echo "Error unmounting \
${sandbox_mp}${each}" + Union_Umount ${unionbackend} ${sandbox_mp}${each} || { \
echo "Error unmounting ${sandbox_mp}${each}"; error=true; } Quiet rmdir \
${sandbox_mp}${each} Quiet rmdir ${sandbox_rw}${each}
'
+ # Do not attempt to 'rm -rf' if some unmount failed.
+ [ "$error" = "true" ] && exit 1
# Clean up legacy links
rm -rf ${sandbox_mp}/usr
@@ -133,7 +136,7 @@
# Mount unionfs
# unionfs doesn't follow bind-mounts, so we must mount everyone sitted on the top of \
/Programs
-bindprograms="`cat /proc/mounts | grep " /Programs" | grep -v union_mp.tmp | cut -d' \
' -f2 | sed 's,.*Area-.*\(/\)\(.*/\)\(.*/\)\(.*\),/\2\3\4,g'`" +bindprograms="`cat \
/proc/mounts | grep " /Programs\| /Files" | grep "Area-" | grep -v union_mp.tmp | cut \
-d' ' -f2 | sed 's,.*Area-.*\(/\)\(.*/\)\(.*/\)\(.*\),/\2\3\4,g'`" unionSandbox=( \
${unionSandbox[@]} $bindprograms ) if [ "$goboIndex" ]
then unionSandbox=( ${unionSandbox[@]} "$goboIndex" )
_______________________________________________
gobolinux-commits mailing list
gobolinux-commits@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic