[Pkg-sysvinit-commits] r1958 - in sysvinit/trunk/debian: . src/initscripts/etc/init.d
Kel Modderman
kelmo-guest at alioth.debian.org
Sat Apr 16 11:01:10 UTC 2011
Author: kelmo-guest
Date: 2011-04-16 11:01:01 +0000 (Sat, 16 Apr 2011)
New Revision: 1958
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/src/initscripts/etc/init.d/checkfs.sh
sysvinit/trunk/debian/src/initscripts/etc/init.d/checkroot.sh
Log:
Handle user interupt of fsck in etc/init.d/checkfs.sh and
init.d/checkroot.sh. Trap SIGINT and handle fsck exit status of 32.
(Closes: #608534)
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2011-04-16 10:53:28 UTC (rev 1957)
+++ sysvinit/trunk/debian/changelog 2011-04-16 11:01:01 UTC (rev 1958)
@@ -123,8 +123,11 @@
* Remove code from /etc/init.d/bootmisc.sh which is not needed with modern
kernel which do not support BSD ptys. The udev check is not reliable
anymore due to /run/. Thanks Marco d'Itri (Closes: #620784)
+ * Handle user interupt of fsck in etc/init.d/checkfs.sh and
+ init.d/checkroot.sh. Trap SIGINT and handle fsck exit status of 32.
+ (Closes: #608534)
- -- Kel Modderman <kel at otaku42.de> Sat, 16 Apr 2011 20:48:53 +1000
+ -- Kel Modderman <kel at otaku42.de> Sat, 16 Apr 2011 20:59:44 +1000
sysvinit (2.88dsf-13.2) unstable; urgency=low
Modified: sysvinit/trunk/debian/src/initscripts/etc/init.d/checkfs.sh
===================================================================
--- sysvinit/trunk/debian/src/initscripts/etc/init.d/checkfs.sh 2011-04-16 10:53:28 UTC (rev 1957)
+++ sysvinit/trunk/debian/src/initscripts/etc/init.d/checkfs.sh 2011-04-16 11:01:01 UTC (rev 1958)
@@ -22,6 +22,9 @@
. /lib/init/swap-functions.sh
do_start () {
+ # Trap SIGINT so that we can handle user interupt of fsck.
+ trap "" INT
+
# See if we're on AC Power. If not, we're not gonna run our
# check. If on_ac_power (in /usr/) is unavailable, behave as
# before and check all file systems needing it.
@@ -99,9 +102,13 @@
FSCKCODE=$?
splash_stop_indefinite
- if [ "$FSCKCODE" -gt 1 ]
+ if [ "$FSCKCODE" -eq 32 ]
then
log_action_end_msg 1 "code $FSCKCODE"
+ log_warning_msg "File system check was interrupted by user"
+ elif [ "$FSCKCODE" -gt 1 ]
+ then
+ log_action_end_msg 1 "code $FSCKCODE"
handle_failed_fsck
else
log_action_end_msg 0
@@ -117,8 +124,11 @@
logsave -s $FSCK_LOGFILE fsck $spinner -V -R -A $fix $force $FSCKTYPES_OPT
FSCKCODE=$?
splash_stop_indefinite
- if [ "$FSCKCODE" -gt 1 ]
+ if [ "$FSCKCODE" -eq 32 ]
then
+ log_warning_msg "File system check was interrupted by user"
+ elif [ "$FSCKCODE" -gt 1 ]
+ then
handle_failed_fsck
else
log_success_msg "Done checking file systems.
Modified: sysvinit/trunk/debian/src/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/src/initscripts/etc/init.d/checkroot.sh 2011-04-16 10:53:28 UTC (rev 1957)
+++ sysvinit/trunk/debian/src/initscripts/etc/init.d/checkroot.sh 2011-04-16 11:01:01 UTC (rev 1958)
@@ -24,6 +24,9 @@
. /lib/init/splash-functions-base
do_start () {
+ # Trap SIGINT so that we can handle user interrupt of fsck.
+ trap "" INT
+
#
# Set SULOGIN in /etc/default/rcS to yes if you want a sulogin to
# be spawned from this script *before anything else* with a timeout,
@@ -238,8 +241,11 @@
# errors were corrected but that the boot may proceed. A return
# code of 2 or 3 indicates that the system should immediately reboot.
#
- if [ "$FSCKCODE" -gt 3 ]
+ if [ "$FSCKCODE" -eq 32 ]
then
+ log_warning_msg "File system check was interrupted by user"
+ elif [ "$FSCKCODE" -gt 3 ]
+ then
# Surprise! Re-directing from a HERE document (as in "cat << EOF")
# does not work because the root is currently read-only.
log_failure_msg "An automatic file system check (fsck) of the root filesystem failed.
More information about the Pkg-sysvinit-commits
mailing list