On Sat, Jul 16, 2022 at 08:13:56AM +0100, Tixy wrote: > On Sat, 2022-07-16 at 05:30 +0100, Gareth Evans wrote: > > I was of the impression (which I think it is fair to say has been created) > > that systemd had done away with /etc/rc.local > > rc.local is still run on the latest Debian stable. You need to make > sure it's a proper executable, i.e. starts with a shebang like > '#!/bin/sh' and the file has execute permissions.
Correct. You can also see its systemd unit: unicorn:~$ systemctl status rc-local ● rc-local.service - /etc/rc.local Compatibility Loaded: loaded (/lib/systemd/system/rc-local.service; static) Drop-In: /lib/systemd/system/rc-local.service.d └─debian.conf Active: inactive (dead) Docs: man:systemd-rc-local-generator(8) unicorn:~$ systemctl cat rc-local # /lib/systemd/system/rc-local.service [...] [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 [...] I'm not using one on this particular computer, hence "inactive (dead)". Note also the Debian changes at the end of the unit file (or in the separate Drop-In literal file if you aren't using "systemctl cat").