From d1cb63729cb64cd3aebb14f00eaa8f03b90a57fe Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 9 Mar 2011 18:07:39 +0000 Subject: [PATCH] fsck: add -C0 and -T options unless fsck is busybox --- init.d/fsck.in | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/init.d/fsck.in b/init.d/fsck.in index de44ea8..3b55fbd 100644 --- a/init.d/fsck.in +++ b/init.d/fsck.in @@ -30,6 +30,10 @@ _forcefsck() [ -e /forcefsck ] || get_bootparam forcefsck } +_fsck_is_busybox() { + [ -L /sbin/fsck ] && [ "$(readlink -f /sbin/fsck)" = "/bin/busybox" ] +} + start() { local fsck_opts= p= check_extra= @@ -60,7 +64,9 @@ start() done if [ "$RC_UNAME" = Linux ]; then - fsck_opts="$fsck_opts -C0 -T" + if ! _fsck_is_busybox; then + fsck_opts="$fsck_opts -C0 -T" + fi if [ -z "$fsck_passno" -a -z "$fsck_mnt" ]; then fsck_args=${fsck_args--A -p} if echo 2>/dev/null >/.test.$$; then -- 1.7.4.1