laptop-mode init script links not created

Bug #127273 reported by Tormod Volden
40
Affects Status Importance Assigned to Milestone
laptop-mode-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: laptop-mode-tools

There is a /etc/init.d/laptop-mode but there are no links in the /etc/rc?.d/ directories. This is because there is no update-rc.d in the .postinst file.

In the Debian source package, there is no debian/laptop-mode-tools.postinst file, so a default one is created by dh_makeinit. This default .postinst file will include the update-rc.d call. However, the Ubuntu delta includes a debian/laptop-mode-tools.postinst, which gets included as is, with no update-rc.d.

In the following debdiff, I'll also include the removal of the acpi scripts, as pointed out by mjg59 on IRC.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

laptop-mode-tools (1.34-1ubuntu2) gutsy; urgency=low

  * debian/rules: Don't ship acpi scripts (we handle that ourselves)
    (This change got lost in the last merge)
  * debian/laptop-mode-tools.postinst: Include update-rc.d (LP: #127276)
    (Debian generates the .postinst from dh_makeinit)

Changed in laptop-mode-tools:
status: New → Confirmed
Revision history for this message
Matthew Garrett (mjg59) wrote :

Looks fine

Revision history for this message
Daniel Holbach (dholbach) wrote :

Matthew: are you going to sponsor the upload or should somebody review it too?

Changed in laptop-mode-tools:
assignee: nobody → mjg59
Revision history for this message
Matthew Garrett (mjg59) wrote :

Oh, one change - can you alter the pre or post-inst so it removes the acpi scripts when upgrading from an older version?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Here I have added rm -f to the postinst. It will complain "dpkg: warning - unable to delete old directory `/etc/acpi/actions': Directory not empty" but I guess that is not a problem - the directory will be empty. Or should the postinst delete it (if it's empty)?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I changed it to rather remove the files in a preinst. Now there are no complaints and the empty directory is gone too.

  * debian/rules: Don't ship acpi scripts (we handle that ourselves)
    (This change got lost in the last merge)
  * debian/laptop-mode-tools.preinst: remove any old acpi scripts
  * debian/laptop-mode-tools.postinst: Include update-rc.d (LP: #127273)
    (Debian generates the .postinst from dh_makeinit)
  * debian/rules: use rm -f to avoid missing-file message

Revision history for this message
Tormod Volden (tormodvolden) wrote :

laptop-mode-tools (1.34-1ubuntu2) gutsy; urgency=low

  * debian/rules: Don't ship acpi scripts (we handle that ourselves)
    (This change got lost in the last merge)
  * debian/laptop-mode-tools.preinst: remove any old acpi scripts
  * debian/laptop-mode-tools.postinst: Include update-rc.d (LP: #127273)
    (Debian generates the .postinst from dh_makeinit)
  * debian/rules: use rm -f to avoid missing-file message

 -- Tormod Volden <email address hidden> Sat, 21 Jul 2007 00:13:42 +0200

Changed in laptop-mode-tools:
status: Confirmed → Fix Released
Revision history for this message
Nic (ntetreau) wrote :

Thanks for your great work Tormod

Revision history for this message
Tormod Volden (tormodvolden) wrote :

laptop-mode-tools (1.35-1ubuntu1) hardy; urgency=low

  * Merge from debian unstable (LP: #164387), remaining changes:
    - etc/init.d/laptop-mode: Check if laptop mode is disabled in
      /etc/default/laptop-mode (that's the file laptop_mode looks into, too,
      but it incorrectly evaluates the ENABLE_LAPTOP_MODE setting) as well
      as in /etc/default/acpi-support.
    - /usr/sbin/laptop_mode: Do not parse arguments, ignore "force" and
      "init" and let start/stop mean enable/disable.
    - /usr/sbin/laptop_mode: Do not read $ACTIVATE_WITH_POSSIBLE_DATA_LOSS
      from /var/run/laptop-mode-state to see if state has changed.
    - Add debian/laptop-mode-tools.postinst: Create /etc/default/laptop-mode
      (with ENABLE_LAPTOP_MODE=false) if the file does not exist yet and we
      are on ppc.
    - debian/laptop-mode-tools.postinst: Include update-rc.d (LP: #127273)
      (Debian generates the .postinst from dh_makeinit)
    - debian/laptop-mode-tools.preinst: remove any old acpi scripts
    - debian/rules: Don't ship acpi scripts (we handle that ourselves)
    - debian/rules: use rm -f to avoid missing-file message
    - debian/control: change maintainer
  * New Ubuntu-only patch:
    - Do not ship apm scripts and remove any old ones
  * Dropped Ubuntu-patches now upstream:
    - Fix error messages when run as non-root (LP: #77560)
  * New upstream changes closing Ubuntu bugs:
    - laptop-mode-tools uses hparm -B 255 instead of 254 (LP: #172282)

laptop-mode-tools (1.35-1) unstable; urgency=low

  * New upstream version 1.35.
  * Listen to more ACPI events for AC adapters. Closes: #448101.
  * Better error messages when laptop_mode status is called by a non-root user.
    Closes: #428162.
  * Clean up temp file from init script, and properly quote messages so that
    they are displayed in full. Closes: #442321, 427292.
  * Set READAHEAD setting correctly on Linux 2.4. Closes: #355492.
  * Set HD power management default values to 254 instead of 255.
    Closes: #451589.
  * Update homepage location in debian/copyright. Closes: #445455.
  * Fix bug in manual page for lm-profiler.conf. Closes: #450431.
  * Don't adjust LCD brightness to the same value as before. Closes: #440115.
  * Modules moved to /usr/share/laptop-mode-tools/modules to improve FHS
    compliance.

 -- Tormod Volden <email address hidden> Wed, 21 Nov 2007 20:42:58 +0100

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.