Merge pull request #93110 from grahamc/systemd-executable

stage-2: parameterized systemd executable
This commit is contained in:
Graham Christensen 2020-07-14 15:45:00 -04:00 committed by GitHub
commit 0c10b75288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -169,4 +169,4 @@ exec {logOutFd}>&- {logErrFd}>&-
echo "starting systemd..."
PATH=/run/current-system/systemd/lib/systemd:@fsPackagesPath@ \
LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
exec systemd
exec @systemdExecutable@

View File

@ -10,6 +10,7 @@ let
src = ./stage-2-init.sh;
shellDebug = "${pkgs.bashInteractive}/bin/bash";
shell = "${pkgs.bash}/bin/bash";
inherit (config.boot) systemdExecutable;
isExecutable = true;
inherit (config.nix) readOnlyStore;
inherit useHostResolvConf;
@ -72,6 +73,15 @@ in
'';
};
systemdExecutable = mkOption {
default = "systemd";
type = types.str;
description = ''
The program to execute to start systemd. Typically
<literal>systemd</literal>, which will find systemd in the
PATH.
'';
};
};
};