[Pkg-sysvinit-devel] Bug#441453: checkrootfs.sh on_ac_power logic broken for me
Mark Purcell
msp at debian.org
Fri Nov 30 10:12:14 UTC 2007
Package: initscripts
Version: 2.86.ds1-38.1
Followup-For: Bug #441453
I'm afraid that neither the current package, nor the
original patch for this bug function correctly for me.
fsck is always run when I'm on battery power.
However the logic in this patch does work for me:
--- checkroot.sh.orig 2007-11-30 10:06:17.000000000 +0000
+++ checkroot.sh 2007-11-29 12:28:17.000000000 +0000
@@ -183,13 +183,14 @@
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
+ # check. If on_ac_power (in /sbin) is unavailable, behave as
# before and check all file systems needing it.
- if which on_ac_power >/dev/null 2>&1 && [ "$rootcheck" = yes ]
+ if [ -x /sbin/on_ac_power ]
then
- on_ac_power >/dev/null 2>&1
- if [ "$?" -eq 1 ]
+ if /sbin/on_ac_power >/dev/null 2>&1
then
+ log_warning_msg "On AC Power"
+ else
log_warning_msg "On battery power, so skipping file system check."
rootcheck=no
fi
Note that on_ac_power is located under /sbin and that /usr/bin is just a symlink.
Mark
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages initscripts depends on:
ii debianutils 2.28 Miscellaneous utilities specific t
ii e2fsprogs 1.40.2-1 ext2 file system utilities and lib
ii libc6 2.7-2 GNU C Library: Shared libraries
ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip
ii mount 2.13-12 Tools for mounting and manipulatin
ii sysvinit-utils 2.86.ds1-38.1 System-V-like utilities
Versions of packages initscripts recommends:
ii psmisc 22.6-1 Utilities that use the proc filesy
-- no debconf information
More information about the Pkg-sysvinit-devel
mailing list