summary refs log tree commit diff
path: root/nixos/modules/system/activation/switch-to-configuration.pl
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-05-05 11:49:03 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-05-05 11:49:03 +0200
commit375bc8def7c17506bc10f3b6193635f05d5ccc40 (patch)
tree6af7662b245e7998bd18ae20d9e74922c489fb6d /nixos/modules/system/activation/switch-to-configuration.pl
parent2f75c6845981b38a698cf1a9f620145877c80956 (diff)
parent7f9ccc628403ed88844a4436da3b2944be5560a4 (diff)
downloadnixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.gz
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.bz2
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.lz
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.xz
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.zst
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.zip
Merge staging into closure-size
Diffstat (limited to 'nixos/modules/system/activation/switch-to-configuration.pl')
-rw-r--r--nixos/modules/system/activation/switch-to-configuration.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 7aa4b12a654..4289740322a 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -322,7 +322,9 @@ foreach my $device (keys %$prevSwaps) {
 
 
 # Should we have systemd re-exec itself?
-my $restartSystemd = abs_path("/proc/1/exe") ne abs_path("@systemd@/lib/systemd/systemd");
+my $prevSystemd = abs_path("/proc/1/exe") or die;
+my $newSystemd = abs_path("@systemd@/lib/systemd/systemd") or die;
+my $restartSystemd = $prevSystemd ne $newSystemd;
 
 
 sub filterUnits {