[Pkg-sysvinit-commits] r1321 - in sysvinit/trunk/debian: . initscripts/lib/init

kelmo-guest at alioth.debian.org kelmo-guest at alioth.debian.org
Mon Feb 2 14:34:53 UTC 2009


Author: kelmo-guest
Date: 2009-02-02 14:34:53 +0000 (Mon, 02 Feb 2009)
New Revision: 1321

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/lib/init/bootclean.sh
Log:
Use -delete option of find(1) instead of piping through xargs in
debian/initscripts/lib/init/bootclean.sh. Closes: #316468, #461103

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2009-02-02 14:15:05 UTC (rev 1320)
+++ sysvinit/trunk/debian/changelog	2009-02-02 14:34:53 UTC (rev 1321)
@@ -36,8 +36,10 @@
     is shown. Check that last argument to start|stop command is a period
     earlier. Thanks to Patrick <pet at painfullscratch.nl>.  Closes: #512003
     LP: #312764
+  * Use -delete option of find(1) instead of piping through xargs in
+    debian/initscripts/lib/init/bootclean.sh. Closes: #316468, #461103
 
- -- Kel Modderman <kel at otaku42.de>  Tue, 03 Feb 2009 00:12:30 +1000
+ -- Kel Modderman <kel at otaku42.de>  Tue, 03 Feb 2009 00:30:35 +1000
 
 sysvinit (2.86.ds1-61) unstable; urgency=low
 

Modified: sysvinit/trunk/debian/initscripts/lib/init/bootclean.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/lib/init/bootclean.sh	2009-02-02 14:15:05 UTC (rev 1320)
+++ sysvinit/trunk/debian/initscripts/lib/init/bootclean.sh	2009-02-02 14:34:53 UTC (rev 1321)
@@ -97,19 +97,14 @@
 
 	#
 	# First remove all old files...
-	# (Use xargs here so that only one additional process gets created)
 	#
-	find . -depth -xdev $TEXPR $EXCEPT ! -type d \
-		-print0 | xargs -0r rm -f -- \
+	find . -depth -xdev $TEXPR $EXCEPT ! -type d -delete \
 		|| { report_err ; return 1 ; }
 
 	#
 	# ...and then all empty directories
-	# (Don't use xargs here because dirs must be removed one by one from
-	# the bottom up)
 	#
-	find . -depth -xdev $DEXPR $EXCEPT -type d -empty \
-		-exec rmdir \{\} \; \
+	find . -depth -xdev $DEXPR $EXCEPT -type d -empty -delete \
 		|| { report_err ; return 1 ; }
 
 	[ "$VERBOSE" = no ] || log_action_end_msg 0
@@ -133,8 +128,7 @@
 			log_action_end_msg 1 "bootclean: Failure cleaning /var/lock"
 		fi
 	}
-	find . ! -type d \
-		-print0 | xargs -0r rm -f -- \
+	find . ! -type d -delete \
 		|| { report_err ; return 1 ; }
 	[ "$VERBOSE" = no ] || log_action_end_msg 0
 	mkflagfile /var/lock/.clean || return 1
@@ -158,8 +152,7 @@
 			log_action_end_msg 1 "bootclean: Failure cleaning /var/run"
 		fi
 	}
-	find . ! -xtype d ! -name utmp ! -name innd.pid \
-		-print0 | xargs -0r rm -f -- \
+	find . ! -xtype d ! -name utmp ! -name innd.pid -delete \
 		|| { report_err ; return 1 ; }
 	[ "$VERBOSE" = no ] || log_action_end_msg 0
 	mkflagfile /var/run/.clean || return 1
@@ -167,7 +160,6 @@
 }
 
 which find >/dev/null 2>&1 || exit 1
-which xargs >/dev/null 2>&1 || exit 1
 
 # If there are flag files that have not been created by root
 # then remove them




More information about the Pkg-sysvinit-commits mailing list