From d91201cb94d951c11f7972ea007b7ee45a7ae081 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 28 Dec 2008 15:25:40 +0000 Subject: [PATCH] Skip all forcefsck checking when stopping, #134. --- init.d/fsck.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/init.d/fsck.in b/init.d/fsck.in index f3c95188..a972edcb 100644 --- a/init.d/fsck.in +++ b/init.d/fsck.in @@ -25,6 +25,11 @@ _reboot() { fi } +_forcefsck() +{ + [ -e /forcefsck ] || get_bootparam forcefsck +} + start() { local fsck_opts= p= check_extra= @@ -33,7 +38,7 @@ start() ewarn "Skipping fsck due to /fastboot" return 0 fi - if [ -e /forcefsck ] || get_bootparam forcefsck; then + if _forcefsck; then fsck_opts="${fsck_opts} -f" check_extra="(check forced)" fi @@ -92,9 +97,7 @@ stop() # Fake function so we always shutdown correctly. _abort() { return 0; } _reboot() { return 0; } - - # Don't check kernel params on stop. - get_bootparam() { return 1; } + _forcefsck { return 1; } yesno "${fsck_shutdown}" && start return 0