* Add additional packages to the path of the interactive shell started

at the end of stage 2.
* Stage 2: set MODULE_DIR to point at a full module tree.

svn path=/nixu/trunk/; revision=6954
This commit is contained in:
Eelco Dolstra 2006-11-04 13:25:10 +00:00
parent 2e2af9df0a
commit 1cec62ba5d
3 changed files with 37 additions and 3 deletions

View File

@ -27,5 +27,16 @@ mount -t tmpfs none /tmp
# Create device nodes in /dev.
source @makeDevices@
# Ensure that the module tools can find the kernel modules.
export MODULE_DIR=@kernel@/lib/modules/
# Additional path for the interactive shell.
for i in @extraPath@; do
PATH=$PATH:$i/bin
if test -e $i/sbin; then
PATH=$PATH:$i/sbin
fi
done
# Start an interactive shell.
exec @shell@

View File

@ -1,14 +1,15 @@
{ genericSubstituter, shell, coreutils
, utillinux
, utillinux, kernel, path ? []
}:
genericSubstituter {
src = ./boot-stage-2-init.sh;
isExecutable = true;
inherit shell;
inherit shell kernel;
path = [
coreutils
utillinux
];
extraPath = path;
makeDevices = ./make-devices.sh;
}

View File

@ -63,8 +63,30 @@ rec {
# The init script of boot stage 2, which is supposed to do
# everything else to bring up the system.
bootStage2 = import ./boot-stage-2.nix {
inherit (pkgs) genericSubstituter coreutils utillinux;
inherit (pkgs) genericSubstituter coreutils utillinux kernel;
shell = pkgs.bash + "/bin/sh";
# Additional stuff; add whatever you want here.
path = [
pkgs.bash
pkgs.bzip2
pkgs.cpio
pkgs.curl
pkgs.e2fsprogs
pkgs.findutils
pkgs.gnugrep
pkgs.gnused
pkgs.gnutar
pkgs.grub
pkgs.gzip
pkgs.iputils
pkgs.less
pkgs.module_init_tools
pkgs.nano
pkgs.netcat
pkgs.nettools
pkgs.vim
];
};