diff options
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/checkfs.sh')
-rwxr-xr-x | meta/packages/initscripts/initscripts-1.0/checkfs.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts-1.0/checkfs.sh b/meta/packages/initscripts/initscripts-1.0/checkfs.sh new file mode 100755 index 0000000000..7d2d75ef57 --- /dev/null +++ b/meta/packages/initscripts/initscripts-1.0/checkfs.sh | |||
@@ -0,0 +1,46 @@ | |||
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 | ||