diff options
Diffstat (limited to 'nixos/modules/system/activation/switch-to-configuration.pl')
-rw-r--r-- | nixos/modules/system/activation/switch-to-configuration.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index 9bf7a5c0d4270..d3e9a97c21204 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -351,8 +351,14 @@ foreach my $device (keys %$prevSwaps) { # Should we have systemd re-exec itself? my $prevSystemd = abs_path("/proc/1/exe") // "/unknown"; +my $prevSystemdSystemConfig = abs_path("/etc/systemd/system.conf") // "/unknown"; my $newSystemd = abs_path("@systemd@/lib/systemd/systemd") or die; +my $newSystemdSystemConfig = abs_path("$out/etc/systemd/system.conf") // "/unknown"; + my $restartSystemd = $prevSystemd ne $newSystemd; +if ($prevSystemdSystemConfig ne $newSystemdSystemConfig) { + $restartSystemd = 1; +} sub filterUnits { |