diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-07-01 08:28:04 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-07-01 08:35:38 +0200 |
commit | 9050077cffa62e63e4d095e4f78c7ae41e2a59b0 (patch) | |
tree | be9868dc3cad821bb03a53b8be3311976e0f27a8 /nixos | |
parent | 17e8032adb9b6ad8558594a19f6d13461d275b45 (diff) | |
download | nixlib-9050077cffa62e63e4d095e4f78c7ae41e2a59b0.tar nixlib-9050077cffa62e63e4d095e4f78c7ae41e2a59b0.tar.gz nixlib-9050077cffa62e63e4d095e4f78c7ae41e2a59b0.tar.bz2 nixlib-9050077cffa62e63e4d095e4f78c7ae41e2a59b0.tar.lz nixlib-9050077cffa62e63e4d095e4f78c7ae41e2a59b0.tar.xz nixlib-9050077cffa62e63e4d095e4f78c7ae41e2a59b0.tar.zst nixlib-9050077cffa62e63e4d095e4f78c7ae41e2a59b0.zip |
switch-to-configuration: use absolute path to systemd-escape
Fixes issue when upgrading from very old NixOS systems that don't have systemd-escape in $PATH: $ sudo nixos-rebuild switch ... building the system configuration... updating GRUB 2 menu... Can't exec "systemd-escape": No such file or directory at /nix/var/nix/profiles/system/bin/switch-to-configuration line 264. Unable to escape /!
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/activation/switch-to-configuration.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index 093b7f1ff225..bb97d0c53a6b 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -261,7 +261,7 @@ while (my ($unit, $state) = each %{$activePrev}) { sub pathToUnitName { my ($path) = @_; - open my $cmd, "-|", "systemd-escape", "--suffix=mount", "-p", $path + open my $cmd, "-|", "@systemd@/bin/systemd-escape", "--suffix=mount", "-p", $path or die "Unable to escape $path!\n"; my $escaped = join "", <$cmd>; chomp $escaped; |