[Fai-commit] r6500 - trunk/bin
Thomas Lange
lange at alioth.debian.org
Sat Apr 23 10:24:23 UTC 2011
Author: lange
Date: 2011-04-23 10:24:21 +0000 (Sat, 23 Apr 2011)
New Revision: 6500
Modified:
trunk/bin/make-fai-nfsroot
Log:
remove old nfsroot with background process
Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot 2011-04-23 10:16:48 UTC (rev 6499)
+++ trunk/bin/make-fai-nfsroot 2011-04-23 10:24:21 UTC (rev 6500)
@@ -539,9 +539,9 @@
[ -L $NFSROOT/proc/self ] && umount $NFSROOT/proc || true
[ -L $NFSROOT/proc/self ] && die 1 "/proc is still mounted inside the nfsroot."
umount $NFSROOT/$MNTPOINT 2>/dev/null || true # it's safer to try to umount
- rm -rf $oldnfsroot/.??* $oldnfsroot/*
- # also remove files $NFSROOT/.? but not . and ..
- find $oldnfsroot -xdev -maxdepth 1 ! -type d | xargs -r rm -f
+ # remove old nfsroot in background
+ mv $oldnfsroot/live $oldnfsroot/.will-now-be-deleted
+ nice rm -rf $oldnfsroot/.will-now-be-deleted &
fi
# Create a new nfsroot
More information about the Fai-commit
mailing list