Ubuntu to purge any remaining System V holdovers

For some, this might be a critical FYI!

3 Likes

Thanks for bringing this up @ericmarceau. While there (most likely) isn’t anything critical for me, I was curious as to what I had left in any of my /etc/init.d/ directories, and was… surprised? (or maybe not surprised because I’m not as informed) as I saw quite a few scripts still there.

While I’m still not convinced that systemd is the correct answer, I think it is good to only have one system going at a time by default. If the user wants to run both or replace systemd then they can do that after install.

2 Likes

I pointed it out because I still have an rc.local script.

3 Likes

rc.local will be executed at boot for the forseeable future.
Even if Ubuntu drops it because it is default part of systemd.

See this default systemd unit-file: /lib/systemd/system/rc-local.service

#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.local is executable.
[Unit]
Description=/etc/rc.local Compatibility
Documentation=man:systemd-rc-local-generator(8)
ConditionFileIsExecutable=/etc/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=infinity
RemainAfterExit=yes
GuessMainPID=no
4 Likes

Quick background, since rc.local is the real catch here, not the SysV scripts.

rc.local is the boot-time junk drawer: a few shell commands you want to run once at startup that don’t justify a full service. No daemon, no logging, run once and done.

On current Ubuntu, what runs it is systemd-rc-local-generator, which auto-pulls that rc-local.service when /etc/rc.local is executable.

The systemd project removed that generator upstream in v260, so this isn’t Canonical’s decision, Ubuntu just inherits it when 26.10 ships the newer systemd. From that release on, an executable /etc/rc.local won’t run at boot on its own.

Yes, @ericmarceau you can just reuse @tkn’s unit to keep it running. If it doesn’t fire, drop the ConditionFileIsExecutable line and it’ll run regardless.

3 Likes