~ubuntu-branches/ubuntu/karmic/sysvinit/karmic-updates

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2009-09-07 19:56:53 UTC
  • mfrom: (1.1.4 upstream) (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090907195653-2i6t0j91wfbf1f0d
Tags: 2.87dsf-4ubuntu1
* Merge from debian unstable, remaining changes:
  - Support Cell processor:
    + debian/initscripts/postinst: Create spu system group and /spu mount
      point if we are running on a Cell processor.
    + debian/initscripts/etc/init.d/mountkernfs.sh: Mount spufs if Cell
      processor is detected.
    + debian/initscripts/lib/init/mount-functions.sh: Modprobe spufs
      if not available.
    + debian/control: Add initscripts dependency 'passwd' for groupadd.
    (Forwarded to Debian #483399)
  - Use tmpfs mounts for /var/lock and /var/run:
    + debian/initscripts/share/default.rcS: Enable RAMRUN and RAMLOCK by
      default.
    + debian/initscripts.postinst: Enable RAMRUN and RAMLOCK in
      /etc/default/rcS on upgrades. This needs to be kept until the next
      LTS.
    + debian/initscripts/etc/init.d/mountkernfs.sh: Propagate files from the
      initramfs to our new /var/run, so that we can populate
      /var/run/sendsigs.omit from initramfs.
  - Boot ordering differences:
    + mountkernfs.sh: 02 -> 01
    + mountdevsubfs.sh: 04 -> 11
    + bootlogd: disabled by default
    + checkroot.sh: 10 -> 20
    + mtab.sh: 12 -> 22
  - debian/patches/91_sulogin_lockedpw.dpatch: Disable "root account is
    locked" warning, since this is the default in Ubuntu. Document this in
    sulogin.8.
  - debian/control: Drop Essential: yes from packages since we use Upstart.
  - debian/control: Conflict/Replace sysvconfig which has also previously
    provided service(8).
  - debian/control, debian/rules: Previous name for sysvinit-utils was
    'sysvutils' in Ubuntu, so Conflict/Replace/Provide it. Also create a
    dummy sysvutils package, since Hardy has reverse versioned dependencies
    to it. This needs to be kept until after the next LTS.
  - debian/control: Depend on lsb-base (>= 3.2-14) for status_of_proc()
    function.
  - debian/initscripts/etc/init.d/checkfs.sh: Don't depend on hwclockfirst
    which Ubuntu does not have.
  - debian/initscripts/etc/init.d/mountkernfs.sh: Always mount devpts, and
    do not touch /dev/ptmx (which is already managed by udev).
  - debian/initscripts/etc/init.d/mountkernfs.sh: mount fusectl if it is
    available
  - debian/initscripts/etc/init.d/mountkernfs.sh: mount securityfs if it is
    available. This allows for easier AppArmor confinement of applications
    early in the boot process. LP: #399954
  - debian/initscripts/etc/init.d/mountkernfs.sh: mount debugfs if it is
    available.
  - debian/initscripts/etc/init.d/ondemand: Sleep for 60 seconds, then
    set CPU Frequency Scaling governor to "ondemand".   LP: #341573.
  - debian/initscripts/etc/init.d/umountfs: Don't unmount filesystems
    that precede root or use force for some mountpoints.
  - debian/initscripts/etc/network/if-up.d/mountnfs: Rename ifstate
    file to /var/run/network/ifstate
  - ./debian/initscripts/lib/init/usplash-fsck-functions.sh: Use blkid,
    vol_id is gone.
  - debian/initscripts.{pre,postinst}: waitnfs.sh -> mountnfs.sh renaming
    transition. This needs to be kept until after the next LTS.

LP: #32455, #94120, #160197, #382097 (amongst others).

* debian/sysv-rc/sbin/update-rc.d: Dropped support for "multiuser"
  command-line option.
* debian/rules: Compat symlink from /usr/bin/service to /usr/sbin/service
* debian/initscripts.postinst: Transition from bootlogs.sh to bootlogs

* debian/sysv-rc.postinst: Don't try and use insserv by default, though
  everything's in place for you to try if you like.  It can be activated
  with:
      USEINSSERV=yes dpkg-reconfigure sysv-rc

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# Should-Start:      mtab cryptdisks
7
7
# Default-Start:     S
8
8
# Default-Stop:
 
9
# X-Interactive:     true
9
10
# Short-Description: Check all filesystems.
10
11
### END INIT INFO
11
12
 
24
25
        # See if we're on AC Power.  If not, we're not gonna run our
25
26
        # check.  If on_ac_power (in /usr/) is unavailable, behave as
26
27
        # before and check all file systems needing it.
27
 
        if which on_ac_power >/dev/null 2>&1
 
28
 
 
29
# Disabled AC power check until fsck can be told to only check the
 
30
# file system if it is corrupt when running on battery. (bug #526398)
 
31
#       if which on_ac_power >/dev/null 2>&1
 
32
#       then
 
33
#               on_ac_power >/dev/null 2>&1
 
34
#               if [ $? -eq 1 ]
 
35
#               then
 
36
#                       [ "$VERBOSE" = no ] || log_success_msg "Running on battery power, so skipping file system check."
 
37
#                       BAT=yes
 
38
#               fi
 
39
#       fi
 
40
        BAT=""
 
41
        fscheck="yes"
 
42
 
 
43
        if [ -f /fastboot ] || grep -s -w -i "fastboot" /proc/cmdline
28
44
        then
29
 
                on_ac_power >/dev/null 2>&1
30
 
                if [ $? -eq 1 ]
31
 
                then
32
 
                        [ "$VERBOSE" = no ] || log_success_msg "Running on battery power, so skipping file system check."
33
 
                        BAT=yes
34
 
                fi
 
45
                [ "$fscheck" = yes ] && log_warning_msg "Fast boot enabled, so skipping file system check."
 
46
                fscheck=no
35
47
        fi
36
48
 
37
49
        #
38
50
        # Check the rest of the file systems.
39
51
        #
40
 
        if [ ! -f /fastboot ] && [ ! "$BAT" ] && [ "$FSCKTYPES" != "none" ]
 
52
        if [ "$fscheck" = yes ] && [ ! "$BAT" ] && [ "$FSCKTYPES" != "none" ]
41
53
        then
42
 
                if [ -f /forcefsck ]
 
54
                if [ -f /forcefsck ] || grep -s -w -i "forcefsck" /proc/cmdline
43
55
                then
44
56
                        force="-f"
45
57
                else
77
89
                if [ "$VERBOSE" = no ]
78
90
                then
79
91
                        log_action_begin_msg "Checking file systems"
80
 
                        if pidof usplash; then
81
 
                            PROGRESS_FILE=`mktemp` || exit 1
82
 
                            set -m
83
 
                            logsave -s $FSCK_LOGFILE fsck -C3 -R -A $fix $force $FSCKTYPES_OPT >/dev/console 2>&1 3>$PROGRESS_FILE &
84
 
                            set +m
85
 
                            usplash_progress "$PROGRESS_FILE"
86
 
                            rm -f $PROGRESS_FILE
87
 
                        else
88
 
                            logsave -s $FSCK_LOGFILE fsck $spinner -R -A $fix $force $FSCKTYPES_OPT
89
 
                            FSCKCODE=$?
90
 
                        fi
 
92
                        if usplash_running; then
 
93
                            PROGRESS_FILE=`mktemp` || exit 1
 
94
                            set -m
 
95
                            logsave -s $FSCK_LOGFILE fsck -C3 -R -A $fix $force $FSCKTYPES_OPT >/dev/console 2>&1 3>$PROGRESS_FILE &
 
96
                            set +m
 
97
                            usplash_progress "$PROGRESS_FILE"
 
98
                            rm -f $PROGRESS_FILE
 
99
                        else
 
100
                            splash_start_indefinite
 
101
                            logsave -s $FSCK_LOGFILE fsck $spinner -R -A $fix $force $FSCKTYPES_OPT
 
102
                            FSCKCODE=$?
 
103
                            splash_stop_indefinite
 
104
                        fi
91
105
 
92
106
                        if [ "$FSCKCODE" -gt 1 ]
93
107
                        then
103
117
                        else
104
118
                                log_action_msg "Will now check all file systems"
105
119
                        fi
 
120
                        splash_start_indefinite
106
121
                        logsave -s $FSCK_LOGFILE fsck $spinner -V -R -A $fix $force $FSCKTYPES_OPT
107
122
                        FSCKCODE=$?
 
123
                        splash_stop_indefinite
108
124
                        if [ "$FSCKCODE" -gt 1 ]
109
125
                        then
110
126
                                handle_failed_fsck