update-rc.d: warning: apcupsd runlevel arguments do not match LSB Default values

Bug #971710 reported by J.D. Stone
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
apcupsd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description: Ubuntu precise (development branch)
Release: 12.04

apcupsd:
  Installed: 3.14.10-1
  Candidate: 3.14.10-1
  Version table:
 *** 3.14.10-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

----

When installing apcupsd (above version), I receive the following warning:
Setting up apcupsd (3.14.10-1) ...
update-rc.d: warning: apcupsd start runlevel arguments (1 2 3 4 5) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: apcupsd stop runlevel arguments (0 6) do not match LSB Default-Stop values (0 1 6)

----

Other than that, the package seems to work fine.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apcupsd (Ubuntu):
status: New → Confirmed
Revision history for this message
Pascal Mons (anton+) wrote :

From : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610429
and the reference : http://wiki.debian.org/LSBInitScripts/

"the problem its that rules [are] set to non default values due [to the] type of daemon...

and LSB header says different ...

must update LSB headers and change to:

# Default-Start: 1 2 3 4 5
# Default-Stop: 0 6

this change[s] are a clear mistake of the packager."

Sorting through this information, you have to modify the file /etc/init.d/apcupsd accordingly.
e.g. Use gedit in super user mode:

$ gksu gedit /etc/init.d/apcupsd

You will see the current (problematic) LSBInit

#!/bin/sh

### BEGIN INIT INFO
# Provides: apcupsd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts apcupsd daemon
# Description: apcupsd provides UPS power management for APC products.
### END INIT INFO

To make this script LSB (Linux Standards Base)-compliant, change it to look like this

#!/bin/sh

### BEGIN INIT INFO
# Provides: apcupsd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 1 2 3 4 5
# Default-Stop: 0 6
# Short-Description: Starts apcupsd daemon
# Description: apcupsd provides UPS power management for APC products.
### END INIT INFO

I managed to rebuild this package with dpkg-deb -b dir-name

And there is no more warning while installing it :

$ sudo dpkg -i apcupsd_3.14.10-2_amd64.deb
(Reading database ... 1195394 files and directories currently installed.)
Preparing to replace apcupsd 3.14.10-2 (using apcupsd_3.14.10-2_amd64.deb) ...
Please check your configuration ISCONFIGURED in /etc/default/apcupsd
Unpacking replacement apcupsd ...
Please check your configuration ISCONFIGURED in /etc/default/apcupsd
Setting up apcupsd (3.14.10-2) ...
Please check your configuration ISCONFIGURED in /etc/default/apcupsd
Processing triggers for man-db ...
Processing triggers for ureadahead ...
$

Cheers :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.