nixpkgs/nixos
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
..
doc nixos/switch-to-configuration: Ignore some unit keys 2022-03-11 13:30:03 +01:00
lib genJqSecretsReplacementSnippet: Fix error handling 2022-02-23 12:48:51 +01:00
maintainers nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
modules nixos/switch-to-configuration: Fix restarting by activation script 2022-03-11 13:30:03 +01:00
tests nixos/switch-to-configuration: Ignore some unit keys 2022-03-11 13:30:03 +01:00
COPYING
default.nix nixos: Make system.build.vm a standard attribute based on vmVariant 2021-12-17 14:49:31 +01:00
README
release-combined.nix nixos/release tested job: drop nano test 2022-03-01 19:28:31 +01:00
release-small.nix nixos/release: disable nfs3.simple 2022-03-03 06:34:59 +10:00
release.nix

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.