diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-04-13 12:28:12 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-04-13 12:28:12 +0200 |
commit | 4466707ddf3476b07f157e198f6de554de0ec0c2 (patch) | |
tree | d8208369ee7744edb1208f7f79d7e5d61cbea95c /nixos/modules/system/activation/switch-to-configuration.pl | |
parent | 6fba1d862801729053d101e6c7e36dd4d5bd16ac (diff) | |
download | nixlib-4466707ddf3476b07f157e198f6de554de0ec0c2.tar nixlib-4466707ddf3476b07f157e198f6de554de0ec0c2.tar.gz nixlib-4466707ddf3476b07f157e198f6de554de0ec0c2.tar.bz2 nixlib-4466707ddf3476b07f157e198f6de554de0ec0c2.tar.lz nixlib-4466707ddf3476b07f157e198f6de554de0ec0c2.tar.xz nixlib-4466707ddf3476b07f157e198f6de554de0ec0c2.tar.zst nixlib-4466707ddf3476b07f157e198f6de554de0ec0c2.zip |
switch-to-configuration: Better error checking
Diffstat (limited to 'nixos/modules/system/activation/switch-to-configuration.pl')
-rw-r--r-- | nixos/modules/system/activation/switch-to-configuration.pl | 4 |
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 7aa4b12a6543..4289740322ad 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 { |