Where Art Thou, Boot.Local

Greetings All,

I have some scripts that I run at boot time to do some custom setups.
In SUSE releases gone by, the call to those scripts was placed in /etc/init.d/boot.local.

After installing Suse v15.0, boot.local was not in this folder, so I created it (with the calls to my scripts).
However, the scripts did NOT get executed when the system booted.

Has boot.local been replaced? If so, what takes it’s place?

Thanx in advance

Richard Rosa

The whole scenario of starting things at boot has changed. It is now (well, since some years already) using systemd.

Best is you create a a systemd unit.

I have found this as a good starter:

writing systemd unit files is pretty simple, it’s more straight forward than for the good old init. I will demonstrate it on a short example:


[Unit]
Description=My cool daemon
After=mysql.service

[Service]
User=daemon_user
ExecStart=/usr/local/bin/daemon

[Install] WantedBy=multi-user.target

If your daemon depends on some other processes you should add it to After section. Maybe you also want to replace daemon_user with the your spcific daemon user.

Then copy this file to /etc/systemd/system/daemon.service, reload configuration with

systemctl --system daemon-reload

and start it with

systemctl start daemon.service

that’s it.

And there are of course man pages.

Thanx for the info.

I was afraid that systemd configuration was the answer…
It always seems like when something simple works, Engineers replace it with something more complicated… :frowning:

However, it looks like boot.local is STILL being processed.
When I created it (when it wasn’t there) I forgot to add the '#!/bin/bash’ first line in the file.
In releases gone by, a sample file was always created, so I never had to bother with it.

For now, I have boot.local back in business (until the next release).

Thanx again for the reply.

Rich

Yes, systemd tries to digest the old SysVinit constructs, but for how long?
See it as a temporary feature that gives you a chance to adapt.

Yes, it’s the rc-local.service that provides this compatibility function for now.

Don’t forget to enable the service. Otherwise it won’t start at boot time:

systemctl enable daemon.service

Correct, Re-reading the thread I noticed I forgot that. Hope it reaches the OP here.