You are not logged in.
I had the habit of restarting all daemons after an upgrade so to make sure the newest libraries, configuration files etc were loaded. I did that with a shell script that restarted the daemons in order which they were listed in rc.conf. With systemd I could do something similar by first getting a list of running services and ordering a 'systemcrl restart <servicename>' for each. But since systemd keeps track of dependencies I wonder if that would be the way to do it. Also I would need to filter out 'one shot' type services that are only needed on bootup.
<edit>restart instead of reload</edit>
<edit>solved it with a little script</edit>
Last edited by rwd (2012-11-27 21:02:02)
Offline
In systemctl, you can see LOAD ACTIVE ands SUB. I'd say the one-shots have SUB=exited, the mount points have SUB=mounted and devices have SUB=plugged. The rest should be safe to reload. If you use a display manager, make sure you exclude that one as well, unless you're prepared to get logged out.
Offline
I think that's what systemctl snapshot does.
snapshot [NAME]
Create a snapshot. If a snapshot name is specified, the new snapshot will be named after it. If none is specified an automatic snapshot name is generated. In either case, the snapshot name used is printed to STDOUT, unless --quiet is specified.A snapshot refers to a saved state of the systemd manager. It is implemented itself as a unit that is generated dynamically with this command and has dependencies on all units active at the time. At a later time the user may return to this state by using the isolate command on the snapshot unit.
Snapshots are only useful for saving and restoring which units are running or are stopped, they do not save/restore any other state. Snapshots are dynamic and lost on reboot.
Then, isolate emergency.target or rescue target and switch to the snapshot.
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
The snapshot way seems the most safe, though somewhat unwieldy. I'll give both ways a try.
Offline
I guess "systemctl restart A.service B.service C.service..." should do the right thing (i.e., as long as the restarts are all done in the same transactions the ordering dependencies specified in the service files will be respected).
Offline