FS#50529 - [systemd] Pacman hook to trigger `systemd daemon-reload` when nappropriate
Attached to Project:
Arch Linux
Opened by John (graysky) - Friday, 26 August 2016, 22:03 GMT
Last edited by Dave Reisner (falconindy) - Friday, 10 March 2017, 12:18 GMT
Opened by John (graysky) - Friday, 26 August 2016, 22:03 GMT
Last edited by Dave Reisner (falconindy) - Friday, 10 March 2017, 12:18 GMT
|
Details
Seems like now might be a good time to implement this and
avoid a manual call to `systemd daemon-reload` by rolling
this into a hook. Are there any downsides to doing this?
This has been discussed several years back[1]; I just opened a new discussion thread[2]. 1. https://bbs.archlinux.org/viewtopic.php?id=173341 2. https://bbs.archlinux.org/viewtopic.php?pid=1649916 |
This task depends upon
Closed by Dave Reisner (falconindy)
Friday, 10 March 2017, 12:18 GMT
Reason for closing: Deferred
Additional comments about closing: Potential downsides to this outweight the benefits.
Friday, 10 March 2017, 12:18 GMT
Reason for closing: Deferred
Additional comments about closing: Potential downsides to this outweight the benefits.
As for specific concerns, it reruns generators so the new units may no longer represent the current state of the system, it resets all OnActive timers, and I've heard (but not tested) that it reruns oneshot services. On my testing, it also screwed up the cursor in my X session.
If Samba updates I can't restart smbd until I do a daemon-reload. What difference does it make if I do it manually or pacman forces it immediately? I'm instructed to do a daemon-reload, I do it, and something happens. There's no indication that daemon-reload will launch GTNW.
It looked like enable could fix per unit but testing smbd and nmbd shows that enable is not per unit and is no better than daemon-reload.
# cd /usr/lib/systemd/system
# rm -f {smbd,nmbd}.service
# systemctl daemon-reload
# pacman -S samba
# systemctl restart smbd
Failed to restart smbd.service: Unit smbd.service not found.
# systemctl restart nmbd
Failed to restart nmbd.service: Unit nmbd.service not found.
# systemctl enable smbd
(no message as it was already enabled)
# systemctl restart nmbd
(no error)
So Bad Things(tm) happen if I so much as enable a newly installed service? The only problem, if any, is that daemon-reload does too much and we need a command that does less.