[systemd-devel] rc-local.service and its future in systemd?
Aki Ketolainen
akik at mykolab.com
Mon Apr 24 08:57:24 UTC 2023
Hi,
I noticed in Rocky Linux 8.7 LXC container image that they've added a
message to /etc/rc.d/rc.local:
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
I created an issue report on this at github:
https://github.com/systemd/systemd/issues/27340
"How to run /etc/rc.d/rc.local as the last Linux bootup task?"
Would it be possible to change the rc-local.service configuration as
follows, so that it could be used similarly as before
i.e. running close to the end of the "runlevel" or systemd target:
[Unit]
After=crond.service
[Install]
WantedBy=default.target
chmod 700 /etc/rc.d/rc.local
systemctl enable rc-local.service
I tested this and see in ps output (ps auxwwf | sort -n -k 2,2 >>
/var/tmp/boot.ps) that it starts after crond
in both multi-user.target and graphical.target.
Best regards,
Aki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230424/742f1512/attachment.htm>
More information about the systemd-devel
mailing list