diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-03-17 15:02:53 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-03-17 15:02:53 +0100 |
commit | 511b86d22dbf3d4a52ac9d6437f0ee0375468f01 (patch) | |
tree | 1c8bdb098eaa4cf95cb3cc3c44114b3940b31797 /nixos/modules/system/activation/switch-to-configuration.pl | |
parent | 28b7d67d08a7a76c7508d4b6a8f791c2eba4a1b9 (diff) | |
download | nixlib-511b86d22dbf3d4a52ac9d6437f0ee0375468f01.tar nixlib-511b86d22dbf3d4a52ac9d6437f0ee0375468f01.tar.gz nixlib-511b86d22dbf3d4a52ac9d6437f0ee0375468f01.tar.bz2 nixlib-511b86d22dbf3d4a52ac9d6437f0ee0375468f01.tar.lz nixlib-511b86d22dbf3d4a52ac9d6437f0ee0375468f01.tar.xz nixlib-511b86d22dbf3d4a52ac9d6437f0ee0375468f01.tar.zst nixlib-511b86d22dbf3d4a52ac9d6437f0ee0375468f01.zip |
Add an option to reload rather than restart changed units
Diffstat (limited to 'nixos/modules/system/activation/switch-to-configuration.pl')
-rw-r--r-- | nixos/modules/system/activation/switch-to-configuration.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index 67b2280af3be..fd2b5b7950d5 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -176,7 +176,10 @@ while (my ($unit, $state) = each %{$activePrev}) { # FIXME: do something? } else { my $unitInfo = parseUnit($newUnitFile); - if (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes")) { + if (boolIsTrue($unitInfo->{'X-ReloadIfChanged'} // "no")) { + write_file($reloadListFile, { append => 1 }, "$unit\n"); + } + elsif (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes")) { push @unitsToSkip, $unit; } else { # If this unit is socket-activated, then stop the |