From d29daf395299fc97b8e13676bc282800a8bddae8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 10 Nov 2009 22:50:48 +0000 Subject: fsck only checks battery when requested, which is not by default. This fixes having JFS as the root partition on battery power. For most modern FS's this is a non op, or a very small op by default so it should be fine. Fixes Gentoo #291654. --- conf.d/fsck | 5 +++++ init.d/fsck.in | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/conf.d/fsck b/conf.d/fsck index 77fd6582..888dc88a 100644 --- a/conf.d/fsck +++ b/conf.d/fsck @@ -13,6 +13,11 @@ #fsck_passno=">1" #fsck_passno="<2" +# Most modern fs's don't require a full fsck on boot, but for those that do +# it may be adivisable to skip this when running on battery. +# WARNING: Do not turn this off if you have any JFS partitions. +fsck_on_battery="YES" + # fsck_shutdown causes fsck to trigger during shutdown as well as startup. # The end result of this is that if any periodic non-root filesystem checks are # scheduled, under normal circumstances the actual check will happen during diff --git a/init.d/fsck.in b/init.d/fsck.in index 279e25cb..220b6492 100644 --- a/init.d/fsck.in +++ b/init.d/fsck.in @@ -73,7 +73,7 @@ start() if _forcefsck; then fsck_opts="$fsck_opts -f" check_extra="(check forced)" - elif ! _on_ac_power; then + elif ! yesno ${fsck_on_battery:-YES} && ! _on_ac_power; then ewarn "Skipping fsck due to not being on AC power" return 0 fi -- cgit v1.2.3