Lines 9-29
Link Here
|
9 |
} |
9 |
} |
10 |
|
10 |
|
11 |
start() { |
11 |
start() { |
12 |
ebegin "Remounting root filesystem read-only (if necessary)" |
12 |
if [ ! -f /fastboot ] |
13 |
mount / -n -o remount,ro &>/dev/null |
|
|
14 |
eend $? |
15 |
ebegin "Checking root filesystem" |
16 |
fsck -a / |
17 |
if [ "$?" -eq 0 ] |
18 |
then |
13 |
then |
19 |
eend 0 |
14 |
ebegin "Remounting root filesystem read-only (if necessary)" |
20 |
elif [ "$?" -eq 1 ] |
15 |
mount / -n -o remount,ro &>/dev/null |
21 |
then |
16 |
eend $? |
22 |
ewend 1 "Filesystem repaired" |
17 |
|
23 |
else |
18 |
ebegin "Checking root filesystem" |
24 |
eend 2 "Filesystem couldn't be fixed :(" |
19 |
if [ -f /forcefsck ] |
25 |
/sbin/sulogin ${CONSOLE} |
20 |
then |
26 |
/sbin/reboot -f |
21 |
ewarn "A full fsck has been forced" |
|
|
22 |
fsck -C -f -a / |
23 |
# /forcefsck isn't deleted because checkfs needs it. |
24 |
# it'll be deleted in that script. |
25 |
else |
26 |
fsck -a / |
27 |
fi |
28 |
if [ "$?" -eq 0 ] |
29 |
then |
30 |
eend 0 |
31 |
elif [ "$?" -eq 1 ] |
32 |
then |
33 |
ewend 1 "Filesystem repaired" |
34 |
else |
35 |
eend 2 "Filesystem couldn't be fixed :(" |
36 |
/sbin/sulogin ${CONSOLE} |
37 |
/sbin/reboot -f |
38 |
fi |
27 |
fi |
39 |
fi |
28 |
|
40 |
|
29 |
ebegin "Remounting root filesystem read/write" |
41 |
ebegin "Remounting root filesystem read/write" |