* Don't put every package in the boot environment in $PATH but rather
create a symlink tree and put that in $PATH. svn path=/nixos/trunk/; revision=7161
This commit is contained in:
parent
cb6c02f092
commit
362f0f752b
@ -11,7 +11,7 @@ echo
|
|||||||
|
|
||||||
# Set the PATH.
|
# Set the PATH.
|
||||||
export PATH=/empty
|
export PATH=/empty
|
||||||
for i in @path@; do
|
for i in @startPath@; do
|
||||||
PATH=$PATH:$i/bin
|
PATH=$PATH:$i/bin
|
||||||
if test -e $i/sbin; then
|
if test -e $i/sbin; then
|
||||||
PATH=$PATH:$i/sbin
|
PATH=$PATH:$i/sbin
|
||||||
@ -135,12 +135,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
# Additional path for the interactive shell.
|
# Additional path for the interactive shell.
|
||||||
for i in @extraPath@; do
|
PATH=@fullPath@/bin:@fullPath@/sbin
|
||||||
PATH=$PATH:$i/bin
|
|
||||||
if test -e $i/sbin; then
|
|
||||||
PATH=$PATH:$i/sbin
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cat > /etc/profile <<EOF
|
cat > /etc/profile <<EOF
|
||||||
export PATH=$PATH
|
export PATH=$PATH
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ genericSubstituter, shell, coreutils, findutils
|
{ genericSubstituter, buildEnv, shell, coreutils, findutils
|
||||||
, utillinux, kernel, udev, upstart
|
, utillinux, kernel, udev, upstart
|
||||||
, path ? []
|
, path ? []
|
||||||
|
|
||||||
@ -12,16 +12,34 @@
|
|||||||
, hostName
|
, hostName
|
||||||
}:
|
}:
|
||||||
|
|
||||||
genericSubstituter {
|
let
|
||||||
src = ./boot-stage-2-init.sh;
|
|
||||||
isExecutable = true;
|
startPath = [
|
||||||
inherit shell kernel upstart readOnlyRoot upstartJobs hostName;
|
|
||||||
path = [
|
|
||||||
coreutils
|
coreutils
|
||||||
findutils
|
findutils
|
||||||
utillinux
|
utillinux
|
||||||
udev
|
udev
|
||||||
upstart
|
upstart
|
||||||
];
|
];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
genericSubstituter {
|
||||||
|
src = ./boot-stage-2-init.sh;
|
||||||
|
isExecutable = true;
|
||||||
|
inherit shell kernel upstart readOnlyRoot upstartJobs hostName;
|
||||||
|
inherit startPath;
|
||||||
|
|
||||||
|
# We don't want to put all of `startPath' and `path' in $PATH, since
|
||||||
|
# then we get an embarrassingly long $PATH. So use the user
|
||||||
|
# environment builder to make a directory with symlinks to those
|
||||||
|
# packages.
|
||||||
|
fullPath = buildEnv {
|
||||||
|
name = "boot-stage-2-path";
|
||||||
|
paths = startPath ++ path;
|
||||||
|
pathsToLink = ["/bin" "/sbin" "/man/man1" "/share/man/man1"];
|
||||||
|
ignoreCollisions = true;
|
||||||
|
};
|
||||||
|
|
||||||
extraPath = path;
|
extraPath = path;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ rec {
|
|||||||
# The init script of boot stage 2, which is supposed to do
|
# The init script of boot stage 2, which is supposed to do
|
||||||
# everything else to bring up the system.
|
# everything else to bring up the system.
|
||||||
bootStage2 = import ../boot/boot-stage-2.nix {
|
bootStage2 = import ../boot/boot-stage-2.nix {
|
||||||
inherit (pkgs) genericSubstituter coreutils findutils
|
inherit (pkgs) genericSubstituter buildEnv coreutils findutils
|
||||||
utillinux kernel udev upstart;
|
utillinux kernel udev upstart;
|
||||||
inherit upstartJobs;
|
inherit upstartJobs;
|
||||||
shell = pkgs.bash + "/bin/sh";
|
shell = pkgs.bash + "/bin/sh";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user