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

Thomas Hood jdthood-guest at costa.debian.org
Fri Nov 25 08:15:04 UTC 2005


Author: jdthood-guest
Date: 2005-11-25 08:15:03 +0000 (Fri, 25 Nov 2005)
New Revision: 263

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/checkfs.sh
   sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
Log:
Use better names for fsck log files; remove some hard coded paths; add note to changelog

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2005-11-24 22:25:28 UTC (rev 262)
+++ sysvinit/trunk/debian/changelog	2005-11-25 08:15:03 UTC (rev 263)
@@ -25,7 +25,9 @@
   * Improve skeleton initscript
   * Shorten motd header  (Closes: #340017)
   * Rotate dmesg log with savelog (Closes: #237074)
-  * Depend on debianutils >= 2.13.1 in order to prevent #295850
+  * Depend on debianutils >= 2.13.1 in order to prevent #295850.
+    Note that debianutils also has to be >= 2.12.0 so that the "which"
+    program is available in /bin.
   * checkfs.sh: Implement FSCKTYPES  (Closes: #89481)
     FSCKTYPES="ext2,msdos" to fsck only file system types ext2 and msdos
     See fsck(8) for syntax.  FSCKTYPES="none" disables fsck of file

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkfs.sh	2005-11-24 22:25:28 UTC (rev 262)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkfs.sh	2005-11-25 08:15:03 UTC (rev 263)
@@ -10,6 +10,8 @@
 # Short-Description: Check all filesystems.
 ### END INIT INFO
 
+PATH=/bin:/sbin
+CHECKFS_FSCK_LOGFILE=/var/log/fsck/checkfs
 [ "$FSCKFIX" ] || FSCKFIX=no
 [ "$VERBOSE" ] || VERBOSE=yes
 [ -f /etc/default/rcS ] && . /etc/default/rcS
@@ -21,9 +23,9 @@
 do_start () {
 	# See if we're on AC Power
 	# If not, we're not gonna run our check
-	if [ -x /usr/bin/on_ac_power ]
+	if which on_ac_power >/dev/null
 	then
-		/usr/bin/on_ac_power >/dev/null 2>&1
+		on_ac_power >/dev/null 2>&1
 		if [ $? -eq 1 ]
 		then
 			log_success_msg "Running on battery power, so skipping file system check."
@@ -61,7 +63,7 @@
 			log_failure_msg "File system check failed. Please repair manually."
 			log_failure_msg "CONTROL-D will terminate this shell and continue system startup."
 			# Start a single user shell on the console
-			/sbin/sulogin $CONSOLE
+			sulogin $CONSOLE
 		}
 		if [ "$VERBOSE" != no ]
 		then
@@ -71,7 +73,7 @@
 			else
 				log_action_msg "Will now check all file systems"
 			fi
-			logsave -s /var/log/fsck/boot.log fsck $spinner -V -R -A $fix $force $FSCKTYPES_OPT
+			logsave -s $CHECKFS_FSCK_LOGFILE fsck $spinner -V -R -A $fix $force $FSCKTYPES_OPT
 			FSCKCODE=$?
 			if [ "$FSCKCODE" -gt 1 ]
 			then
@@ -81,7 +83,7 @@
 			fi
 		else
 			log_action_begin_msg "Checking file systems"
-			logsave -s /var/log/fsck/boot.log fsck $spinner -V -R -A $fix $force $FSCKTYPES_OPT >/dev/null
+			logsave -s $CHECKFS_FSCK_LOGFILE fsck $spinner -V -R -A $fix $force $FSCKTYPES_OPT >/dev/null
 			FSCKCODE=$?
 			if [ "$FSCKCODE" -gt 1 ]
 			then

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2005-11-24 22:25:28 UTC (rev 262)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2005-11-25 08:15:03 UTC (rev 263)
@@ -11,6 +11,7 @@
 ### END INIT INFO
 
 PATH=/lib/init:/bin:/sbin
+CHECKROOT_FSCK_LOGFILE=/var/log/fsck/checkroot
 [ "$FSCKFIX" ] || FSCKFIX=no
 [ "$SULOGIN" ] || SULOGIN=no
 [ "$VERBOSE" ] || VERBOSE=yes
@@ -257,7 +258,7 @@
 		if [ "$VERBOSE" != no ]
 		then
 			log_action_msg "Will now check root file system"
-			logsave -s /var/log/fsck/root.log fsck $spinner $force $fix -V -t $roottype $rootdev
+			logsave -s $CHECKROOT_FSCK_LOGFILE fsck $spinner $force $fix -V -t $roottype $rootdev
 			FSCKCODE=$?
 			if [ "$FSCKCODE" = 0 ]
 			then
@@ -267,7 +268,7 @@
 			fi
 		else
 			log_action_begin_msg "Checking root file system"
-			logsave -s /var/log/fsck/root.log fsck $spinner $force $fix -V -t $roottype $rootdev >/dev/null
+			logsave -s $CHECKROOT_FSCK_LOGFILE fsck $spinner $force $fix -V -t $roottype $rootdev >/dev/null
 			FSCKCODE=$?
 			log_action_end_msg $FSCKCODE
 		fi




More information about the Pkg-sysvinit-commits mailing list