Debian Bug report logs - #326647
initscripts: Should not fsck when laptop is running on battery

version graph

Package: initscripts; Maintainer for initscripts is Debian sysvinit maintainers <[email protected]>; Source for initscripts is src:sysvinit (PTS, buildd, popcon).

Reported by: Petter Reinholdtsen <[email protected]>

Date: Sun, 4 Sep 2005 19:33:02 UTC

Severity: normal

Tags: patch

Found in versions initscripts/2.86.ds1-1, 2.86.ds1-62, initscripts/2.84-1

Fixed in version 2.86.ds1-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Miquel van Smoorenburg <[email protected]>:
Bug#326647; Package initscripts. (full text, mbox, link).


Acknowledgement sent to Petter Reinholdtsen <[email protected]>:
New Bug report received and forwarded. Copy sent to Miquel van Smoorenburg <[email protected]>. (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Petter Reinholdtsen <[email protected]>
To: [email protected]
Subject: initscripts: Should not fsck when laptop is running on battery
Date: Sun, 04 Sep 2005 21:17:01 +0200
Package: initscripts
Version: 2.86.ds1-1
Tags: patch

While reviewing the patches from Ubuntu, I came across a nice
improvement.  Make sure to not run fsck if the machine is running on
battery.  This would make the boot process a lot better for laptops.

This is the patch needed to make this happen.  It is not a proper
patch, because I fished it out of the larger patch from ubuntu, but it
should be no problem to apply this manually to the check-scripts.

debian/initscripts/etc/init.d/checkfs.sh

 FSCKFIX=no
 [ -f /etc/default/rcS ] && . /etc/default/rcS
 
+# See if we're on AC Power
+# If not, we're not gonna run our check (Ubuntu #4680)
+if [ -x /usr/bin/on_ac_power ]; then
+        /usr/bin/on_ac_power >/dev/null 2>&1
+        if [ $? -eq 1 ]; then
+             echo "On battery, not fscking!"
+             ac=no
+        fi
+fi
+ 
 #
 # Check the rest of the file systems.
 #
-if [ ! -f /fastboot ]
+if [ ! -f /fastboot ] && [ -z "$ac" ]
 then
     if [ -f /forcefsck ]
     then

debian/initscripts/etc/init.d/checkroot.sh

 /sbin/sulogin $CONSOLE
 reboot -f
 fi
 
+# See if we're on AC Power
+# If not, we're not gonna run our check (Ubuntu #4680)
+if [ -x /usr/bin/on_ac_power ] && [ $rootcheck = yes ]; then
+        /usr/bin/on_ac_power >/dev/null 2>&1
+        if [ "$?" -eq 1 ]; then
+             echo "On battery, not fscking!"
+             rootcheck=no
+        fi
+fi
+                
 #
 #See if we want to check the root file system.
 #
 FSCKCODE=0
 if [ -f /fastboot ] || [ $rootcheck = no ]



Message sent on to Petter Reinholdtsen <[email protected]>:
Bug#326647. (full text, mbox, link).


Message #8 received at [email protected] (full text, mbox, reply):

From: Petter Reinholdtsen <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected],[email protected], [email protected],[email protected], [email protected],[email protected], [email protected]
Cc: Miquel van Smoorenburg <[email protected]>
Subject: Can you test a new version of sysvinit?
Date: Mon, 05 Sep 2005 20:12:23 +0200
Hello

I'm preparing an NMU of sysvinit, to fix a few bugs.  Your bug report
is one of these bugs.  To reduce the possibility of messing up, I want
to ask if you can test the packages I have prepared and verify that it
work for you and solve your problem.

The test packages are available from
<URL:http://developer.skolelinux.no/~pere/debian/packages/>.  To test,
download them like this, and install them.

  for f in initscripts_2.86.ds1-1.1.pere.7_i386.deb \
           sysv-rc_2.86.ds1-1.1.pere.7_all.deb \
           sysvinit_2.86.ds1-1.1.pere.7_i386.deb ; do \
      wget http://developer.skolelinux.no/~pere/debian/packages/$f ; \
  done

This is the current changelog:

sysvinit (2.86.ds1-1.1.pere.7) UNRELEASED; urgency=low

  * Non-maintainer upload.
  * Moved all changes to upstream source to debian/patches/, and use
    dpatch to apply them.
  * Splitted umountfs in umountfs and umountroot. (Closes: #252059)
  * Avoid umounting /dev/ in umountfs. (Closes: #287243)
  * Made sure all init.d scripts handle start or stop
    argument. (Closes: #326495)
  * Added GFS file system to list of networked file systems.
    (Closes: #295094)
  * Added ocfs2 file system in to list of networked file systems.  Patch
    from Fabio M. Di Nitto and Ubuntu.
  * Modified pidof to not print empty line if no pid was found.
    (Closes: #225476)
  * Merged rcS into rc. (Closes: #326460)
  * Added trailing newline to the rebooting message, to make sure
    kernel messages end up on lines of their own during
    reboot. (Closes: #323749)
  * Rewrote /etc/mtab handling in mountvirtfs to work with
    SELinux. (Closes: #270919)
  * Added init.d script dependency info in LSB format. (Closes: #325933)
  * Do not fsck when running on battery.  Patch from Thom May and
    Ubuntu. (Closes: #326647)
  * Updated initscripts to depend on lsb-base, and use the LSB
    functions in all init.d scripts.  Patch from Ubuntu. (Closes: #269774)
  * Added some support for VERBOSE in checkfs.sh.
  * Convert french version of update-rc.d(8) from UTF-8 to
    ISO-8859-1. (Closes: #273496)
  * Make sure urandom pool size is restored on boot. (Closes: #267935)
  * Make sure binaries are stripped when installed, to avoid lintian
    warning.
  * Fix typo in debian/README (seperate->separate).
  * Modify debian/rules to install Debian changelog for sysv-rc and
    initscripts as changelog.Debian to keep lintian happy.
  * Corrected section of mountpoint(1) manual page.
  * Changed init.d/rc to short-circit stop scripts when switching
    runlevels.  Based on patches from Lukas Eppler and Steven
    Barker. (Closes: #30659)
  * Optimize boot speed by enabling the short-circit of start-scripts
    when switcing from rcS.d to the real runlevel.
  * Make it easier to override /etc/defaults/rcS parameters. (Closes: #286081)
  * Updated Standards-Version to 3.6.2.1 (no changes needed).

 -- Petter Reinholdtsen <[email protected]>  Sun,  4 Sep 2005 15:00:14 +0200

As you can see, there are quite a few changes, so I want to make sure
I did not mess anything up.  I've tested the boot on two of my
machines, but would like to hear more test reports.



Tags added: fixed Request was from Petter Reinholdtsen <[email protected]> to [email protected]. (full text, mbox, link).


Reply sent to Petter Reinholdtsen <[email protected]>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Petter Reinholdtsen <[email protected]>:
Bug acknowledged by developer. (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Petter Reinholdtsen <[email protected]>
To: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: This bug is fixed now
Date: Sun, 11 Sep 2005 19:50:29 +0200
Version: 2.86.ds1-2

This bug was fixed with the upload of sysvinit version 2.86.ds1-2.
Not sure why this bug wasn't closed, but as a workaround I close it
no.  This was the changelog of the upload closing this bug.

 sysvinit (2.86.ds1-2) unstable; urgency=low
 .
   * This package is now maintained on Alioth as the pkg-sysvinit project.
   * Add myself as uploader.
   * Add support for linprocfs on kFreeBSD. Patch from Robert
     Millan. (Closes: #300963)
   * Rewrote /etc/mtab handling in mountvirtfs to work with SELinux.
     Based on patch from Luke Kenneth Casson Leighton.
     (Closes: #270919)
   * Add SELinux support to sysvinit on linux.  Add build-depend on
     libselinux1-dev and libsepol1-dev for all linux archs.  Patch from
     Manoj Srivastava, based on patch from Fedora.  (Closes: #242900,
     #249515,#315611)
   * Drop redundant build-depend on essensial package bash.
   * Add version 0.47 of startpar(8) program from SuSe.  Part of
     experimental parallel booting system.  Not included by default
     yet, as it tend to hang during boot.
   * Add support for starting init.d scripts on the same level in
     parallel, to speed up the boot process a bit.  Currently, only a
     simple system is implemented (and enabled by adding
     CONCURRENCY=shell in /etc/default/rcS).  This simple system messes
     up the script output during boot.  Disabled by default.  (Closes:
     #316290)
   * Add 'kdm xdm gdm $syslog' as conditional dependencies of
     rmnologin, to move it further back in the boot process.
   * Make sure bootlogd return non-error exit code after forking off
     the child.  (Closes: #326640)
   * Add more warning flags to list of compiler flags, to get more
     info about problematic code.
   * Avoid race-condition while fork()ing.  Patch from SuSe.
     (Closes: #327612)
   * Improve error message when fork() fail in init.  Patch from SuSe.
   * Avoid hardcoding tty name length in wall, use UT_LINESIZE instead.
     Patch from SuSe.
   * Force kernel to reschedule after killing processes.  Patch from SuSe.
   * Make sure killall never tries to kill init (pid 1).  Patch from SuSe.
   * Acknowledge NMUs.  (Closes: #30659, #85221, #204857, #225476,
     #247102, #248739 #252059, #267935, #269774, #269894, #272588,
     #272916, #273496, #277204, #281782, #284426, #286081, #287243,
     #288098, #289562, #295094, #295335, #296489, #300645, #311741,
     #314351, #316431, #317385, #317704, #318453, #318857, #323749,
     #325933, #326460, #326495, #326647)



Bug marked as found in version 2.84-1. Request was from Petter Reinholdtsen <[email protected]> to [email protected]. (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <[email protected]> to [email protected]. (Mon, 25 Jun 2007 11:59:55 GMT) (full text, mbox, link).


Bug unarchived. Request was from Joey Hess <[email protected]> to [email protected]. (Wed, 14 Oct 2009 16:57:08 GMT) (full text, mbox, link).


Bug Marked as found in versions 2.86.ds1-62 and reopened. Request was from Joey Hess <[email protected]> to [email protected]. (Wed, 14 Oct 2009 16:57:08 GMT) (full text, mbox, link).


Removed tag(s) fixed. Request was from Touko Korpela <[email protected]> to [email protected]. (Sun, 14 Mar 2010 15:48:11 GMT) (full text, mbox, link).


Information forwarded to [email protected], Debian sysvinit maintainers <[email protected]>:
Bug#326647; Package initscripts. (Mon, 04 Dec 2017 17:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to thanh dong <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <[email protected]>. (Mon, 04 Dec 2017 17:27:03 GMT) (full text, mbox, link).


Message #30 received at [email protected] (full text, mbox, reply):

From: thanh dong <[email protected]>
To: [email protected]
Subject: thanh dong 19652110
Date: Mon, 4 Dec 2017 12:22:02 -0500

Được gửi từ iPhone của tôi


Added indication that bug 326647 blocks 460404 Request was from Pierre Ynard <[email protected]> to [email protected]. (Tue, 05 Mar 2019 22:12:05 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 13:51:18 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.