On 2023-09-01 at 16:50, Greg Wooledge wrote: > On Fri, Sep 01, 2023 at 08:32:40PM +0000, Michael Kjörling wrote: > >> I don't think /etc/rc.local is executed by default on modern Debian >> systems. Have you checked to make sure that rc-local.service is >> enabled and actually gets started during boot? Is there anything >> relevant in the logs for that? Is /etc/rc.local set as executable? > > The rc-local.service is enabled by default. It will execute /etc/rc.local > if it exists and is executable. > > The Debian installer used to create a stub /etc/rc.local file which had > a correct shell script shebang, and the necessary permissions. This is > longer created during installation, so the user would need to create > it themselves, if they want to have it. They'd also have to know enough > to put a correct shebang on it, and to do chmod +x. That's not a huge > barrier to entry, but it's just enough to confuse some people.
It's actually still available, although I expect you're right that in a default configuration it won't be installed during Debian installation: $ dlocate /etc/rc.local initscripts: /etc/rc.local $ apt-cache policy initscripts initscripts: Installed: 3.07-1 Candidate: 3.07-1 Version table: *** 3.07-1 900 900 http://ftp.us.debian.org/debian testing/main amd64 Packages 900 http://ftp.us.debian.org/debian testing/main i386 Packages 100 /var/lib/dpkg/status $ cat /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. if test -d /etc/boot.d ; then run-parts /etc/boot.d fi This is in an environment that's running sysvinit, not systemd; 'sysvinit-core' currently depends on the 'initscripts' package. I'm not in a position to tell whether there would be issues trying to install 'initscripts' in a systemd environment, but I just offhand wouldn't particularly expect there to be. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature