Skip to content

Commit

Permalink
nixos/lxc-container: use absolute path for ln in install-lxc-sbin-ini…
Browse files Browse the repository at this point in the history
…t.sh

Recent change to nixos-rebuild (#258571)
adds systemd-run, which brings with it a cleaner environment
(ie $PATH not available).
Workaround: use absolute path for ln to avoid command-not-found error
  • Loading branch information
josephst authored and Artturin committed Oct 22, 2023
1 parent cb44be3 commit d156ab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/lxc-container.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ in {

system.build.installBootLoader = pkgs.writeScript "install-lxd-sbin-init.sh" ''
#!${pkgs.runtimeShell}
ln -fs "$1/init" /sbin/init
${pkgs.coreutils}/bin/ln -fs "$1/init" /sbin/init
'';

systemd.additionalUpstreamSystemUnits = lib.mkIf cfg.nestedContainer ["systemd-udev-trigger.service"];
Expand Down

0 comments on commit d156ab6

Please sign in to comment.