* Setting boot.localCommands for anything you want to execute before

Upstart is started.

svn path=/nixos/trunk/; revision=8229
This commit is contained in:
Eelco Dolstra 2007-03-06 00:45:33 +00:00
parent 8d731dacad
commit 8851530afb
4 changed files with 21 additions and 2 deletions

View File

@ -100,6 +100,10 @@ mknod -m 0644 /dev/urandom c 1 9 # needed for passwd
export MODULE_DIR=@kernel@/lib/modules/
# Run any user-specified commands.
@shell@ @bootLocal@
# Start an interactive shell.
#exec @shell@

View File

@ -1,4 +1,4 @@
{ substituteAll, coreutils
{ substituteAll, writeText, coreutils
, utillinux, kernel, udev, upstart
, activateConfiguration
@ -8,6 +8,9 @@
, # Path for Upstart jobs. Should be quite minimal.
upstartPath
, # User-supplied command to be run just before Upstart is started.
bootLocal ? ""
}:
substituteAll {
@ -20,4 +23,5 @@ substituteAll {
udev
upstart
];
bootLocal = writeText "boot.local" bootLocal;
}

View File

@ -179,6 +179,16 @@
}
{
name = ["boot" "localCommands"];
default = "";
example = "text=anything; echo You can put $text here.";
description = "
Shell commands to be executed just before Upstart is started.
";
}
{
name = ["networking" "hostName"];
default = "nixos";

View File

@ -248,7 +248,7 @@ rec {
# The init script of boot stage 2, which is supposed to do
# everything else to bring up the system.
bootStage2 = import ../boot/boot-stage-2.nix {
inherit (pkgs) substituteAll coreutils
inherit (pkgs) substituteAll writeText coreutils
utillinux kernel udev upstart;
inherit activateConfiguration;
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
@ -259,6 +259,7 @@ rec {
pkgs.gnused
pkgs.upstart
];
bootLocal = config.get ["boot" "localCommands"];
};