clean up unmodified /etc/rc.local on upgrade

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

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 After=network-online.target (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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers