diff options
author | Roy Marples <roy@marples.name> | 2008-04-17 00:09:34 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-04-17 00:09:34 +0000 |
commit | c89b3763fb9b940e43c61b2dba1653a0d5229b91 (patch) | |
tree | 5746ad8c4a2421c7ab067c602fc1335b0797e8bc /init.d/fsck.in | |
parent | 425abe40c5b511e684efe508972b9036462a2358 (diff) |
Respect shutdown -F on Linux to force fsck, #59
Diffstat (limited to 'init.d/fsck.in')
-rw-r--r-- | init.d/fsck.in | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/init.d/fsck.in b/init.d/fsck.in index f469ce81..3eeba63c 100644 --- a/init.d/fsck.in +++ b/init.d/fsck.in @@ -27,14 +27,18 @@ _reboot() { start() { - local reboot_opts= fsck_opts= p= + local reboot_opts= fsck_opts= p= check_extra= if [ -e /fastboot ]; then ewarn "Skipping fsck due to /fastboot" return 0 fi + if [ -e /forcefsck ]; then + fsck_opts="${fsck_opts} -f" + check_extra="(check forced)" + fi - ebegin "Checking local filesystems" + ebegin "Checking local filesystems ${check_extra}" for p in ${fsck_passno}; do local IFS="${_IFS}" case "${p}" in @@ -45,7 +49,7 @@ start() done if [ "${RC_UNAME}" = "Linux" ]; then - fsck_opts="-C0 -T" + fsck_opts="${fsck_opts} -C0 -T" if [ -z "${fsck_passno}" ]; then fsck_args=${fsck_args--A -p} if echo 2>/dev/null >/.test.$$; then |