Thanks Petter, Your patch works for me. Certainly much better than the current package, which runs fsck even when I'm on battery.
Also I suspect this is also addressing the same issue as #483394, just in a different manner, so I have merged, of course you may still wish to address independently. Mark On Sun, 23 Dec 2007, Petter Reinholdtsen wrote: > I do not quite understand the patch proposed by Mark Purcell. Why is > the dynamic check that will use the PATH to locate on_ac_power > replaced with a check to use a hardcoded location? I tried merging > the two patches to handle exit code 255 and providing more output > while still keeping the dynamic PATH location part. Will this patch > solve your problem? > > It might be an idea to disable the log messages when VERBOSE=no, and I > am not sure if log_warning_msg is the best method to use for all these > messages. > > Please test the patch and provide feedback. > > Index: checkroot.sh > =================================================================== > --- checkroot.sh (revision 1084) > +++ checkroot.sh (working copy) > @@ -190,13 +190,20 @@ > fi > > # See if we're on AC Power. If not, we're not gonna run our > - # check. If on_ac_power (in /usr/) is unavailable, behave as > - # before and check all file systems needing it. > + # check. If on_ac_power (in /sbin/) is unusable or > + # unavailable, behave as before and check all file systems > + # needing it. > if which on_ac_power >/dev/null 2>&1 && [ "$rootcheck" = yes ] > then > - on_ac_power >/dev/null 2>&1 > - if [ "$?" -eq 1 ] > + > + on_ac_power >/dev/null 2>&1 > + if [ "$?" -eq 0 ] > then > + log_warning_msg "On AC Power" > + elif [ "$?" -eq 255 ] > + then > + log_warning_msg "Can't check power status (maybe > missing ACPI > support?)" + else > log_warning_msg "On battery power, so skipping file > system check." > rootcheck=no > fi > > Happy hacking,
signature.asc
Description: This is a digitally signed message part.