3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/modules/system
Eelco Dolstra 96ba0ca283 For some units, use "systemctl restart" rather than "systemctl stop/start"
During a configuration switch, changed units are stopped in the old
configuration, then started in the new configuration (i.e. after
running the activation script and running "systemctl daemon-reload").
This ensures that services are stopped using the ExecStop/ExecStopPost
commands from the old configuration.

However, for some services it's undesirable to stop them; in
particular dhcpcd, which deconfigures its network interfaces when it
stops.  This is dangerous when doing remote upgrades - usually things
go right (especially because the switch script ignores SIGHUP), but
not always (see 9aa69885f0).  Likewise,
sshd should be kept running for as long as possible to prevent a
lock-out if the switch fails.

So the new option ‘stopIfChanged = false’ causes "systemctl restart"
to be used instead of "systemctl stop" followed by "systemctl start".
This is only proper for services that don't have stop commands.  (And
it might not handle dependencies properly in some cases, but I'm not
sure.)
2013-01-05 01:05:25 +01:00
..
activation For some units, use "systemctl restart" rather than "systemctl stop/start" 2013-01-05 01:05:25 +01:00
boot For some units, use "systemctl restart" rather than "systemctl stop/start" 2013-01-05 01:05:25 +01:00
etc Lowercase debug output 2012-10-04 21:44:45 -04:00
upstart Fix coverage data collection 2012-10-30 17:27:14 +01:00