[Pkg-sysvinit-commits] r192 -
sysvinit/trunk/debian/initscripts/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Mon Nov 21 12:11:56 UTC 2005
Author: jdthood-guest
Date: 2005-11-21 12:11:56 +0000 (Mon, 21 Nov 2005)
New Revision: 192
Modified:
sysvinit/trunk/debian/initscripts/etc/init.d/bootclean.sh
Log:
Remove old Miquel version comment; fix indentation and formatting
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/bootclean.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/bootclean.sh 2005-11-21 12:08:10 UTC (rev 191)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/bootclean.sh 2005-11-21 12:11:56 UTC (rev 192)
@@ -1,32 +1,29 @@
#
# bootclean.sh Functions to clean /tmp, /var/run and /var/lock.
#
-# Version: @(#)bootclean.sh 2.86-2 27-Aug-2004 miquels at cistron.nl
-#
+
. /lib/lsb/init-functions
. /etc/default/rcS
cleantmp() {
-
[ -f /tmp/.clean ] && return
[ -z "$TMPTIME" ] && TMPTIME=0
# Don't clean /tmp if TMPTIME < 0 or "infinite".
case "$TMPTIME" in
- -*|infinite)
- return
- ;;
+ -*|infinite)
+ return
+ ;;
esac
+ # Wipe /tmp, but exclude system files.
+ # Note that files _in_ lost+found _are_ deleted.
#
- # Wipe /tmp, but exclude system files.
- # Note that files _in_ lost+found _are_ deleted.
- #
[ "$VERBOSE" != no ] && log_action_begin_msg "Cleaning /tmp"
#
- # If $TMPTIME is set to 0, we do not use any ctime expression
- # at all, so we can also delete files with timestamps
- # in the future!
+ # If $TMPTIME is set to 0, we do not use any ctime expression
+ # at all, so we can also delete files with timestamps
+ # in the future!
#
if [ "$TMPTIME" = 0 ]
then
@@ -43,8 +40,8 @@
set +o noclobber
#
- # Only clean out /tmp if it is world-writable. This ensures
- # it really is a/the temp directory we're cleaning.
+ # Only clean out /tmp if it is world-writable. This ensures
+ # it really is a/the temp directory we're cleaning.
#
EXCEPT='! -name .
! ( -path ./lost+found -uid 0 )
@@ -73,11 +70,9 @@
cleanlock() {
#
- # Clean up any stale locks.
+ # Clean up any stale locks.
#
-
[ -f /var/lock/.clean ] && return
-
[ "$VERBOSE" != no ] && log_action_begin_msg "Cleaning /var/lock"
( cd /var/lock && find . ! -type d -exec rm -f -- {} \; )
rm -f /var/lock/.clean
@@ -89,11 +84,9 @@
cleanrun() {
#
- # Clean up /var/run.
+ # Clean up /var/run.
#
-
[ -f /var/run/.clean ] && return
-
[ "$VERBOSE" != no ] && log_action_begin_msg "Cleaning /var/run"
( cd /var/run && \
find . ! -type d ! -name utmp ! -name innd.pid \
@@ -106,7 +99,6 @@
}
bootclean() {
-
# Only run if find and xargs are available.
if [ ! -x /bin/find ] && [ ! -x /usr/bin/find ]
then
@@ -119,8 +111,10 @@
# If there are /tmp/.clean files which have not been created
# by root remove them
- for cleandir in /tmp /var/run /var/lock; do
- if [ -f $cleandir/.clean ] ; then
+ for cleandir in /tmp /var/run /var/lock
+ do
+ if [ -f $cleandir/.clean ]
+ then
[ -x /usr/bin/stat ] && cleanuid=`/usr/bin/stat -c %u $cleandir/.clean`
# Poor's man stat %u, since stat (and /usr) might not be
# available in some bootup stages
@@ -129,8 +123,7 @@
fi
done
- if [ -f /tmp/.clean ] && [ -f /var/run/.clean ] &&
- [ -f /var/lock/.clean ]
+ if [ -f /tmp/.clean ] && [ -f /var/run/.clean ] && [ -f /var/lock/.clean ]
then
return
fi
@@ -139,3 +132,4 @@
[ -d /var/run ] && cleanrun
[ -d /var/lock ] && cleanlock
}
+
More information about the Pkg-sysvinit-commits
mailing list