* Renamed boot.localCommands to boot.postBootCommands since it wasn't

such a good name (local to what?).

svn path=/nixos/branches/modular-nixos/; revision=15879
This commit is contained in:
Eelco Dolstra 2009-06-05 16:02:58 +00:00
parent 5cf8604b1e
commit 0a0260514d
3 changed files with 29 additions and 21 deletions

View file

@ -85,4 +85,12 @@ in
}
];
};
# After booting, register the contents of the Nix store on the CD in
# the Nix database in the tmpfs.
boot.postBootCommands =
''
${config.environment.nix}/bin/nix-store --load-db < /nix-path-registration
rm /nix-path-registration
'';
}

View file

@ -131,7 +131,7 @@ export MODULE_DIR=@kernel@/lib/modules/
# Run any user-specified commands.
@shell@ @bootLocal@
@shell@ @postBootCommands@
# Start Upstart's init. We start it through the

View file

@ -4,12 +4,13 @@ let
options = {
boot.localCommands = pkgs.lib.mkOption {
boot.postBootCommands = pkgs.lib.mkOption {
default = "";
example = "text=anything; echo You can put $text here.";
description = "
example = "rm -f /var/log/messages";
merge = pkgs.lib.mergeStringOption;
description = ''
Shell commands to be executed just before Upstart is started.
";
'';
};
};
@ -19,28 +20,27 @@ let
activateConfiguration = config.system.activationScripts.script;
# Path for Upstart jobs. Should be quite minimal.
upstartPath = [
pkgs.coreutils
pkgs.findutils
pkgs.gnugrep
pkgs.gnused
pkgs.upstart
];
bootLocal = config.boot.localCommands;
upstartPath =
[ pkgs.coreutils
pkgs.findutils
pkgs.gnugrep
pkgs.gnused
pkgs.upstart
];
bootStage2 = substituteAll {
src = ./stage-2-init.sh;
isExecutable = true;
inherit kernel upstart activateConfiguration upstartPath;
path = [
coreutils
utillinux
udev
upstart
];
bootLocal = writeText "local-cmds" bootLocal;
path =
[ coreutils
utillinux
udev
upstart
];
postBootCommands = writeText "local-cmds" config.boot.postBootCommands;
};
in
{