clean up unmodified /etc/rc.local on upgrade

Bug #1716979 reported by Steve Langasek on 2017-09-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Dimitri John Ledkov
ubuntu-release-upgrader (Ubuntu)

Bug Description

If a user's system was installed before zesty, the initscripts package was installed as part of the base system, and a stub /etc/rc.local was created on install.

rc.local is very much a legacy interface (it was legacy under Debian's sysvinit, so it's three generations of legacy); and if /etc/rc.local is present and executable, systemd runs an additional unit, rc-local.service, which is (due to
/lib/systemd/system/rc-local.service.d/debian.conf). This can unnecessarily impact boot speed in the event that the network is not available at boot.

Since the initscripts package no longer exists in zesty and later, and this package should preferably be removed on upgrade, we can't put maintainer script code in this package to manage the removal of /etc/rc.local.

Adding this to any other system package would be a kludge.

I think this belongs as a quirk on upgrade, to remove the /etc/rc.local left behind by initscripts if it is unmodified.

Here is the md5sum of the stock file, which has remained consistent from (at least) lucid through xenial:

$ md5sum /etc/rc.local
10fd9f051accb6fd1f753f2d48371890 /etc/rc.local

Steve Langasek (vorlon) on 2017-09-13
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → Medium
Changed in systemd (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Dimitri John Ledkov (xnox)
milestone: none → ubuntu-17.09
Steve Langasek (vorlon) wrote :

Dimitri intends to handle this in systemd postinst instead.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Won't Fix
Changed in systemd (Ubuntu):
status: Confirmed → Fix Committed
tags: added: id-59b965e3325c6b38afd5122b
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 234-2ubuntu12

systemd (234-2ubuntu12) artful; urgency=medium

  [ Dimitri John Ledkov ]
  * debian/rules: do not strip test-copy.
    This insures test-copy is large enough for test-copy tests to pass.
    (LP: #1721203)

  [ Michael Biebl ]
  * Drop systemd-timesyncd.service.d/disable-with-time-daemon.conf.
    All major NTP implementations ship a native service file nowadays with a
    Conflicts=systemd-timesyncd.service so this drop-in is no longer
    necessary. (Closes: #873185) (LP: #1721204)

 -- Dimitri John Ledkov <email address hidden> Wed, 04 Oct 2017 13:28:34 +0100

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers