diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh | |
download | poky-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh | 50 |
1 files changed, 50 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..62869451b7 --- /dev/null +++ b/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh | |||
@@ -0,0 +1,50 @@ | |||
1 | #!/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 | # | ||
16 | if test ! -f /fastboot | ||
17 | then | ||
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 | ||
47 | fi | ||
48 | rm -f /fastboot /forcefsck | ||
49 | |||
50 | : exit 0 | ||