~ubuntu-branches/debian/experimental/sysvinit/experimental

« back to all changes in this revision

Viewing changes to debian/src/initscripts/etc/init.d/checkfs.sh

  • Committer: Bazaar Package Importer
  • Author(s): Roger Leigh, Roger Leigh, Kel Modderman
  • Date: 2011-04-16 16:50:51 UTC
  • Revision ID: james.westby@ubuntu.com-20110416165051-z4ykh9v4ne11w0bw
Tags: 2.88dsf-13.4
[ Roger Leigh ]
* Non-maintainer upload.

[ Kel Modderman ]
* 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)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
. /lib/init/swap-functions.sh
23
23
 
24
24
do_start () {
 
25
        # Trap SIGINT so that we can handle user interupt of fsck.
 
26
        trap "" INT
 
27
 
25
28
        # See if we're on AC Power.  If not, we're not gonna run our
26
29
        # check.  If on_ac_power (in /usr/) is unavailable, behave as
27
30
        # before and check all file systems needing it.
99
102
                        FSCKCODE=$?
100
103
                        splash_stop_indefinite
101
104
 
102
 
                        if [ "$FSCKCODE" -gt 1 ]
 
105
                        if [ "$FSCKCODE" -eq 32 ]
 
106
                        then
 
107
                                log_action_end_msg 1 "code $FSCKCODE"
 
108
                                log_warning_msg "File system check was interrupted by user"
 
109
                        elif [ "$FSCKCODE" -gt 1 ]
103
110
                        then
104
111
                                log_action_end_msg 1 "code $FSCKCODE"
105
112
                                handle_failed_fsck
117
124
                        logsave -s $FSCK_LOGFILE fsck $spinner -V -R -A $fix $force $FSCKTYPES_OPT
118
125
                        FSCKCODE=$?
119
126
                        splash_stop_indefinite
120
 
                        if [ "$FSCKCODE" -gt 1 ]
 
127
                        if [ "$FSCKCODE" -eq 32 ]
 
128
                        then
 
129
                                log_warning_msg "File system check was interrupted by user"
 
130
                        elif [ "$FSCKCODE" -gt 1 ]
121
131
                        then
122
132
                                handle_failed_fsck
123
133
                        else