nixpkgs/nixos/modules/system
Janne Heß 3052d3aa50
nixos/switch-to-configuration: Fix restarting by activation script
This bug is so obscure and unlikely that I was honestly not able to
properly write a test for it. What happens is that we are calling
handleModifiedUnit() with $unitsToStart=\%unitsToRestart. We do this to
make sure that the unit is stopped before it's started again which is
not possible by regular means because the stop phase is already done
when calling the activation script.

recordUnit() still gets $startListFile, however which is the wrong file.
The bug would be triggered if an activation script requests a service
restart for a service that has `stopIfChanged = true` and
switch-to-configuration is killed before the restart phase was run. If
the script is run again, but the activation script is not requesting
more restarts, the unit would be started instead of restarted.
2022-03-11 13:30:03 +01:00
..
activation nixos/switch-to-configuration: Fix restarting by activation script 2022-03-11 13:30:03 +01:00
boot logrotate/systemd: add 'minsize = 1M' to wtmp/btmp rotation 2022-02-27 07:20:26 +09:00
etc nixos/etc.nix: Make independent 2022-01-30 09:01:27 +01:00
build.nix nixos: Make system.build a submodule with freeformType 2022-01-24 00:52:46 +01:00