diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index 7c2d64d2e1a1..7bce06cf3b5a 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -65,7 +65,7 @@ $SIG{PIPE} = "IGNORE"; sub getActiveUnits { # FIXME: use D-Bus or whatever to query this, since parsing the # output of list-units is likely to break. - my $lines = `LANG= @systemd@/bin/systemctl list-units --full --no-legend`; + my $lines = `LANG= systemctl list-units --full --no-legend`; my $res = {}; foreach my $line (split '\n', $lines) { chomp $line; @@ -297,7 +297,7 @@ foreach my $device (keys %$prevSwaps) { if (scalar @unitsToStop > 0) { @unitsToStop = unique(@unitsToStop); print STDERR "stopping the following units: ", join(", ", sort(@unitsToStop)), "\n"; - system("@systemd@/bin/systemctl", "stop", "--", @unitsToStop); # FIXME: ignore errors? + system("systemctl", "stop", "--", @unitsToStop); # FIXME: ignore errors? } print STDERR "NOT restarting the following units: ", join(", ", sort(@unitsToSkip)), "\n"