~ubuntu-branches/ubuntu/saucy/sysvinit/saucy

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Roger Leigh, Kel Modderman, Roger Leigh, [:space:
  • Date: 2011-12-13 20:11:48 UTC
  • mfrom: (2.1.32 sid)
  • mto: (2.1.33 sid)
  • mto: This revision was merged to the branch mainline in revision 178.
  • Revision ID: package-import@ubuntu.com-20111213201148-dzhk6hdjkm4r1atb
Tags: 2.88dsf-14
[ Kel Modderman ]
* Add support for s390x, thanks to Aurelien Jarno <aurel32@debian.org>.
  (Closes: #641107)

[ Roger Leigh ]
* debian/rules:
  - Add build-arch and -indep rules. (Closes: #648472)
  - Remove dpatch usage.
  - Use dh and debhelper compat level 9.
* debian/control:
  - Add git version control information.
  - Upgrade to Standards-Version 3.9.2.
  - Add myself to Uploaders.
* Use dpkg 3.0 (quilt) source format.  Rediffed
  debian/patches/40_multiarch_libcrypt.patch which was not well
  formed and failed to apply.
* initscripts:
  - Make /etc/mtab a symlink to /proc/mounts. (Closes: #494001)
    Note that this is only done when the root filesystem is writable
    and /proc/mount is readable.
  - Support the ceph network filesystem. (Closes: #580579).  Thanks
    to Sage Weil.
  - Restore boot-time cleaning of /var/run and /var/lock, used by
    systems which currently do not use a tmpfs for /run.
  - Remove /lib/init/rw: Add Breaks for all packages which used
    /lib/init/rw, and which now use /run.  Unmount and remove
    following upgrade.
  - Don't create /run/.run-transition on upgrade, only on actually
    setting up a transitional bind mount.
  - Add Breaks on all packages previously using /lib/init/rw, in
    order to permit removal of /lib/init/rw.  It is not possible to
    remove prior to rebooting due to initscripts being required to
    be configured by the packages transitioning to /run.  Remove in
    wheezy+1.
  - Remove trailing period from the initscripts init script log
    message.  (Closes: #648881).  Thanks to Clint Byrum.
  - /etc/network/if-up.d/mountnfs: grep: character class syntax is
    [[:space:]], not [:space:]. (Closes: #631077, #645655).  Thanks to
    Milan Kocian and Jan-Benedict Glaw.  Also simplify function logic
    using a for loop rather than a while loop.  Thanks to Corey Hickey.
* sysv-rc:
  - Remove splash support and use of removed /dev/.initramfs.
    (Closes: #643558).  Thanks to Michael Biebl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
. /lib/lsb/init-functions
23
23
. /lib/init/mount-functions.sh
24
 
. /lib/init/splash-functions-base
25
24
 
26
25
do_start () {
27
26
        # Trap SIGINT so that we can handle user interrupt of fsck.
204
203
                  dumb|network|unknown|"")
205
204
                        spinner="" ;;
206
205
                esac
207
 
                # This Linux/s390 special case should go away.
208
 
                if [ "${KERNEL}:${MACHINE}" = Linux:s390 ]
 
206
                # This Linux/s390x special case should go away.
 
207
                if [ "${KERNEL}:${MACHINE}" = Linux:s390x ]
209
208
                then
210
209
                        spinner=""
211
210
                fi
213
212
                if [ "$VERBOSE" = no ]
214
213
                then
215
214
                        log_action_begin_msg "Checking root file system"
216
 
                        splash_start_indefinite
217
215
                        logsave -s $FSCK_LOGFILE fsck $spinner $force $fix -t $roottype $rootdev
218
216
                        FSCKCODE=$?
219
 
                        splash_stop_indefinite
220
217
                        if [ "$FSCKCODE" = 0 ]
221
218
                        then
222
219
                                log_action_end_msg 0
224
221
                                log_action_end_msg 1 "code $FSCKCODE"
225
222
                        fi
226
223
                else
227
 
                        splash_start_indefinite
228
224
                        log_daemon_msg "Will now check root file system"
229
225
                        logsave -s $FSCK_LOGFILE fsck $spinner $force $fix -V -t $roottype $rootdev
230
226
                        FSCKCODE=$?
231
227
                        log_end_msg $FSCKCODE
232
 
                        splash_stop_indefinite
233
228
                fi
234
229
        fi
235
230
 
286
281
                mount -n -o remount,$rootopts,$rootmode /
287
282
        fi
288
283
 
 
284
        # If possible, migrate /etc/mtab to be a symlink to
 
285
        # /proc/mounts.  Note that not all systems e.g. Hurd currently
 
286
        # support this.
 
287
        if [ "$rootmode" != "ro" ]; then
 
288
                mtab_migrate
 
289
        fi
 
290
 
289
291
        #
290
292
        # We only create/modify /etc/mtab if the location where it is
291
293
        # stored is writable. If /etc/mtab is a symlink into /proc/
295
297
        MTAB_PATH="$(readlink -f /etc/mtab || :)"
296
298
        case "$MTAB_PATH" in
297
299
          /proc/*)
 
300
                # Assume that /proc/ is not writable (do nothing)
298
301
                ;;
299
302
          /*)
 
303
                # Common case for file or symlink (initialise)
300
304
                if touch "$MTAB_PATH" >/dev/null 2>&1
301
305
                then
302
306
                        :> "$MTAB_PATH"
 
307
                        chmod 644 /etc/mtab
303
308
                        rm -f ${MTAB_PATH}~
304
309
                        INIT_MTAB_FILE=yes
305
310
                fi
318
323
                ;;
319
324
        esac
320
325
 
 
326
        if selinux_enabled && [ -x /sbin/restorecon ] && [ -r /etc/mtab ]
 
327
        then
 
328
                restorecon /etc/mtab
 
329
        fi
 
330
 
321
331
        if [ "$INIT_MTAB_FILE" = yes ]
322
332
        then
323
333
                [ "$roottype" != none ] &&