[Pkg-sysvinit-commits] r635 - in sysvinit/trunk/debian: . initscripts/etc/init.d

Thomas Hood jdthood-guest at costa.debian.org
Thu Jan 12 19:26:06 UTC 2006


Author: jdthood-guest
Date: 2006-01-12 19:26:05 +0000 (Thu, 12 Jan 2006)
New Revision: 635

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/bootclean
Log:
Always rm /tmp/.X*-lock

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-01-12 18:52:14 UTC (rev 634)
+++ sysvinit/trunk/debian/changelog	2006-01-12 19:26:05 UTC (rev 635)
@@ -5,6 +5,7 @@
   * bootclean: Adapt from old bootclean.sh; handle return status more
     carefully; print diagnostic messages on failures; eliminate use of
     subshells; add comments; improve deletion code
+  * bootclean: Always rm /tmp/.X*-lock
   * mountall.sh: Eliminate unnecessary check for pre-2.4 Linux kernel
   * mountnfs.sh, mountall.sh: Choose different names for intnl. functions
   * mountnfs.sh: Only sleep 1 second after starting portmap; note that

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/bootclean
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/bootclean	2006-01-12 18:52:14 UTC (rev 634)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/bootclean	2006-01-12 19:26:05 UTC (rev 635)
@@ -28,15 +28,29 @@
 clean_tmp() {
 	cd /tmp || { log_failure_msg "bootclean: Could not cd to /tmp." ; return 1 ; }
 
+	#
+	# Only clean out /tmp if it is world-writable. This ensures
+	# it really is a/the temp directory we're cleaning.
+	#
+	[ "$(find . -maxdepth 0 -perm -002)" = "." ] || return 0
+
 	if [ ! "$TMPTIME" ]
 	then
 		log_warning_msg "Using default TMPTIME 0."
 		TMPTIME=0
 	fi
 
-	# Don't clean /tmp if TMPTIME < 0 or "infinite"
+	[ "$VERBOSE" = no ] || log_action_begin_msg "Cleaning /tmp"
+
+	#
+	# Remove regardless of TMPTIME setting
+	#
+	rm -f .X*-lock
+
+	# Don't clean remaining files in /tmp if TMPTIME < 0 or "infinite"
 	case "$TMPTIME" in
 	  -*|infinite|infinity)
+		[ "$VERBOSE" = no ] || log_action_end_msg 0 "skipped"
 		return 0
 		;;
 	esac
@@ -67,15 +81,8 @@
 		! ( -path ./.clean -uid 0 )
 		! ( -path './...security*' -uid 0 )'
 
-	#
-	# Only clean out /tmp if it is world-writable. This ensures
-	# it really is a/the temp directory we're cleaning.
-	#
-	[ "$(find . -maxdepth 0 -perm -002)" = "." ] || return 0
-
 	mkflagfile /tmp/.clean || return 1
 
-	[ "$VERBOSE" = no ] || log_action_begin_msg "Cleaning /tmp"
 	report_err()
 	{
 		if [ "$VERBOSE" = no ]
@@ -94,8 +101,6 @@
 	find . -depth -xdev $DEXPR $EXCEPT -type d -empty \
 		-print0 | xargs -0r rmdir --ignore-fail-on-non-empty -- \
 		|| { report_err ; return 1 ; }
-	rm -f .X*-lock \
-		|| { report_err ; return 1 ; }
 	[ "$VERBOSE" = no ] || log_action_end_msg 0
 	return 0
 }




More information about the Pkg-sysvinit-commits mailing list