[Fai-commit] r6235 - trunk/lib
Thomas Lange
lange at alioth.debian.org
Tue Dec 14 16:30:58 UTC 2010
Author: lange
Date: 2010-12-14 16:30:45 +0000 (Tue, 14 Dec 2010)
New Revision: 6235
Modified:
trunk/lib/mkramdisk
Log:
fix umount when directory is a mount point
Before, if /target/var was a mount point and gets a ramdisk it could
not be umounted properly. This is now fixed.
Modified: trunk/lib/mkramdisk
===================================================================
--- trunk/lib/mkramdisk 2010-12-13 14:22:28 UTC (rev 6234)
+++ trunk/lib/mkramdisk 2010-12-14 16:30:45 UTC (rev 6235)
@@ -54,8 +54,8 @@
set -e
mkdir $ram
mount --move $disk $ram # move current ramdisk to a new location
- rm -rf $disk
- cp -a $ram $disk # copy ramdisk contents to disk
+ rm -rf $disk/* $disk/.??* || true
+ cp -a $ram/. $disk/. # copy ramdisk contents to disk
umount $ram
echo "Ramdisk on $d umounted"
rmdir $ram
More information about the Fai-commit
mailing list