update-rc.d does not disables runlevel 1 services

Bug #1477685 reported by Tony Garcia
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Under certain circumstances update-rc.d does not disable packages from starting, specifically on runlevel 1.

In this example I'm using dns-clean service provided by pppconfig

pppconfig enables the following service via postinst:
  #!/bin/sh

  # Postinst for pppconfig by John Hasler 1999-2005
  # Any possessor of a copy of this program may treat it as if it
  # were in the public domain. I waive all rights.

  set -e

  if [ -x "`which update-menus`" ] ; then
      update-menus
  fi if dpkg --compare-versions "$2" lt "2.3.18ubuntu2"; then
          update-rc.d -f dns-clean remove >/dev/null
  fi
  update-rc.d dns-clean start 70 1 2 3 4 5 . >/dev/null

  exit 0

After installation of pppconfig package the following rc.N symlinks are set for this service:
  # ls -1 /etc/rc*/*dns-clean
  /etc/rc1.d/S70dns-clean
  /etc/rc2.d/S70dns-clean
  /etc/rc3.d/S70dns-clean
  /etc/rc4.d/S70dns-clean
  /etc/rc5.d/S70dns-clean

When attempting to disable this is what I get:
  # /usr/sbin/update-rc.d dns-clean disable
  update-rc.d: warning: start runlevel arguments (none) do not match dns-clean Default-Start values (1 2 3 4 5)
   Disabling system startup links for /etc/init.d/dns-clean ...
   Removing any system startup links for /etc/init.d/dns-clean ...
     /etc/rc1.d/S70dns-clean
     /etc/rc2.d/S70dns-clean
     /etc/rc3.d/S70dns-clean
     /etc/rc4.d/S70dns-clean
     /etc/rc5.d/S70dns-clean
   Adding system startup for /etc/init.d/dns-clean ...
     /etc/rc1.d/S70dns-clean -> ../init.d/dns-clean
     /etc/rc2.d/K30dns-clean -> ../init.d/dns-clean
     /etc/rc3.d/K30dns-clean -> ../init.d/dns-clean
     /etc/rc4.d/K30dns-clean -> ../init.d/dns-clean
     /etc/rc5.d/K30dns-clean -> ../init.d/dns-clean

Note that the service is still disabled on runlevel 1, the expected outcome is to disable runlevel 1 as well.

--- OS/Package(s) Information:

# lsb_release -rd
Description: Ubuntu 14.04.2 LTS
Release: 14.04

# apt-cache policy sysv-rc
sysv-rc:
  Installed: 2.88dsf-41ubuntu6.2
  Candidate: 2.88dsf-41ubuntu6.2
  Version table:
 *** 2.88dsf-41ubuntu6.2 0
        500 http://mirror.rackspace.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.88dsf-41ubuntu6 0
        500 http://mirror.rackspace.com/ubuntu/ trusty/main amd64 Packages

# apt-cache policy pppconfig
pppconfig:
  Installed: 2.3.19ubuntu1
  Candidate: 2.3.19ubuntu1
  Version table:
 *** 2.3.19ubuntu1 0
        500 http://mirror.rackspace.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Tony Garcia (tonyskapunk) wrote :

Update on the package

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

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

Changed in sysvinit (Ubuntu):
status: New → Confirmed
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.