nixpkgs/modules/system/activation
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-script.nix Don't do readlink() on every mount point when remounting /dev etc. 2013-01-02 18:28:44 +01:00
no-clone.nix better workaround for building nested child configurations 2012-05-18 06:17:08 +00:00
switch-to-configuration.pl For some units, use "systemctl restart" rather than "systemctl stop/start" 2013-01-05 01:05:25 +01:00
top-level.nix Use config.system.build.systemd in the toplevel derivation 2012-10-10 16:49:59 -04:00