nixos/activation: fix activation script for non-POSIX shells (#46042)
This fixes an issue with shells like fish that are not fully POSIX compliant. The syntax `ENV=val cmd' doesn't work properly in there. This issue has been addressed in #45932 and #45945, however it has been recommended to use a single shell (`stdenv.shell' which is either `bash' or `sh') to significantly reduce the maintenance overload in the future. See https://github.com/NixOS/nixpkgs/issues/45897#issuecomment-417923464 Fixes #45897 /cc @FRidh @xaverdh @etu
This commit is contained in:
parent
f70dc57ad3
commit
df05618f2a
@ -419,7 +419,7 @@ while (my $f = <$listActiveUsers>) {
|
||||
my ($uid, $name) = ($+{uid}, $+{user});
|
||||
print STDERR "reloading user units for $name...\n";
|
||||
|
||||
system("su", "-l", $name, "-c", "XDG_RUNTIME_DIR=/run/user/$uid @systemd@/bin/systemctl --user daemon-reload");
|
||||
system("su", "-s", "@shell@", "-l", $name, "-c", "XDG_RUNTIME_DIR=/run/user/$uid @systemd@/bin/systemctl --user daemon-reload");
|
||||
}
|
||||
|
||||
close $listActiveUsers;
|
||||
|
@ -115,6 +115,7 @@ let
|
||||
|
||||
inherit (pkgs) utillinux coreutils;
|
||||
systemd = config.systemd.package;
|
||||
inherit (pkgs.stdenv) shell;
|
||||
|
||||
inherit children;
|
||||
kernelParams = config.boot.kernelParams;
|
||||
|
Loading…
Reference in New Issue
Block a user