On Sun, 20 Feb 2022 12:40:50 -0500, Bit Twister <
[email protected]> wrote:
On Sun, 20 Feb 2022 11:58:13 -0500, David W. Hodgins wrote:
In a terminal program such as konsole or gnome-terminal either use "su -" to >> become root and then enter the command, or if you've set it up, use (as the >> regular user, "sudo systemctl daemon-reload". A third option is to reboot the
system, just like with kernel or glibc updates as that will also force all daemons
(always running programs such as polkit) to be restarted.
I agree a reboot will cause all daemons to be restarted, but I am not sure systemd will run any newly installed unit files. As I misunderstand it systemd keeps a separate copy of the unit files that are the ones executed
on start/stop. The reload command copies all those unit files back into
the actual directories systemd uses to start/stop those units.
I base the above on experience with changing my custom unit files and trying to have systemd run the unit where it complains about the unit file has changed and requests me to do a reload to pick up the new unit file.
There are two similar sub commands of systemctl. From the systemctl man page ...
=========
reload PATTERN...
Asks all units listed on the command line to reload their configuration. Note that this will reload the service-specific configuration, not the unit configuration file of systemd. If you want
systemd to reload the configuration file of a unit, use the daemon-reload command. In other words: for the example case of Apache, this will reload Apache's httpd.conf in the web server, not
the apache.service systemd unit file.
This command should not be confused with the daemon-reload command.
daemon-reload
Reload the systemd manager configuration. This will rerun all generators (see systemd.generator(7)), reload all unit files, and recreate the entire dependency tree. While the daemon is being
reloaded, all sockets systemd listens on behalf of user configuration will stay accessible.
This command should not be confused with the reload command. =========
The info that is being reloaded by the daemon reload is all of the inter-relationships between various units. That info is in ram only (/run/systemd/).
I've never seen a situation where changing a unit file and then rebooting also required running "systemctl daemon-reload".
Regards, Dave Hodgins
--- MBSE BBS v1.0.8 (Linux-x86_64)
* Origin: A noiseless patient Spider (2:250/1@fidonet)