]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/initscripts/initscripts-1.0/checkfs.sh
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / initscripts / initscripts-1.0 / checkfs.sh
1 #
2 # checkfs.sh    Check all filesystems.
3 #
4 # Version:      @(#)checkfs  2.83  05-Oct-2001  miquels@cistron.nl
5 #
6
7 . /etc/default/rcS
8
9 #
10 # Check the rest of the filesystems.
11 #
12 if test ! -f /fastboot
13 then
14     if test -f /forcefsck
15     then
16         force="-f"
17     else
18         force=""
19     fi
20     if test "$FSCKFIX"  = yes
21     then
22         fix="-y"
23     else
24         fix="-a"
25     fi
26     spinner="-C"
27     case "$TERM" in
28         dumb|network|unknown|"") spinner="" ;;
29     esac
30     test "`uname -m`" = "s390" && spinner="" # This should go away
31     test "$VERBOSE" != no && echo "Checking all filesystems..."
32     fsck $spinner -R -A $fix $force
33     if test "$?" -gt 1
34     then
35       echo
36       echo "fsck failed.  Please repair manually."
37       echo
38       echo "CONTROL-D will exit from this shell and continue system startup."
39       echo
40       # Start a single user shell on the console
41       /sbin/sulogin $CONSOLE
42     fi
43 fi
44 rm -f /fastboot /forcefsck
45
46 : exit 0