summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/checkfs.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh
new file mode 100755
index 0000000000..91897d4cbb
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh
@@ -0,0 +1,49 @@
1### BEGIN INIT INFO
2# Provides: checkfs
3# Required-Start: checkroot
4# Required-Stop:
5# Default-Start: S
6# Default-Stop:
7# Short-Description: Check all other file systems
8### END INIT INFO
9
10. /etc/default/rcS
11
12#
13# Check the rest of the filesystems.
14#
15if test ! -f /fastboot
16then
17 if test -f /forcefsck
18 then
19 force="-f"
20 else
21 force=""
22 fi
23 if test "$FSCKFIX" = yes
24 then
25 fix="-y"
26 else
27 fix="-a"
28 fi
29 spinner="-C"
30 case "$TERM" in
31 dumb|network|unknown|"") spinner="" ;;
32 esac
33 test "`uname -m`" = "s390" && spinner="" # This should go away
34 test "$VERBOSE" != no && echo "Checking all filesystems..."
35 fsck $spinner -R -A $fix $force
36 if test "$?" -gt 1
37 then
38 echo
39 echo "fsck failed. Please repair manually."
40 echo
41 echo "CONTROL-D will exit from this shell and continue system startup."
42 echo
43 # Start a single user shell on the console
44 /sbin/sulogin $CONSOLE
45 fi
46fi
47rm -f /fastboot /forcefsck
48
49: exit 0