blob: 62869451b760ce04ada45083286bff6863e98a0e [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2### BEGIN INIT INFO
3# Provides: checkfs
4# Required-Start: checkroot
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Check all other file systems
9### END INIT INFO
10
11. /etc/default/rcS
12
13#
14# Check the rest of the filesystems.
15#
16if test ! -f /fastboot
17then
18 if test -f /forcefsck
19 then
20 force="-f"
21 else
22 force=""
23 fi
24 if test "$FSCKFIX" = yes
25 then
26 fix="-y"
27 else
28 fix="-a"
29 fi
30 spinner="-C"
31 case "$TERM" in
32 dumb|network|unknown|"") spinner="" ;;
33 esac
34 test "`uname -m`" = "s390" && spinner="" # This should go away
35 test "$VERBOSE" != no && echo "Checking all filesystems..."
36 fsck $spinner -R -A $fix $force
37 if test "$?" -gt 1
38 then
39 echo
40 echo "fsck failed. Please repair manually."
41 echo
42 echo "CONTROL-D will exit from this shell and continue system startup."
43 echo
44 # Start a single user shell on the console
45 /sbin/sulogin $CONSOLE
46 fi
47fi
48rm -f /fastboot /forcefsck
49
50: exit 0