* Setting boot.localCommands for anything you want to execute before
Upstart is started. svn path=/nixos/trunk/; revision=8229
This commit is contained in:
parent
8d731dacad
commit
8851530afb
@ -100,6 +100,10 @@ mknod -m 0644 /dev/urandom c 1 9 # needed for passwd
|
|||||||
export MODULE_DIR=@kernel@/lib/modules/
|
export MODULE_DIR=@kernel@/lib/modules/
|
||||||
|
|
||||||
|
|
||||||
|
# Run any user-specified commands.
|
||||||
|
@shell@ @bootLocal@
|
||||||
|
|
||||||
|
|
||||||
# Start an interactive shell.
|
# Start an interactive shell.
|
||||||
#exec @shell@
|
#exec @shell@
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ substituteAll, coreutils
|
{ substituteAll, writeText, coreutils
|
||||||
, utillinux, kernel, udev, upstart
|
, utillinux, kernel, udev, upstart
|
||||||
, activateConfiguration
|
, activateConfiguration
|
||||||
|
|
||||||
@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
, # Path for Upstart jobs. Should be quite minimal.
|
, # Path for Upstart jobs. Should be quite minimal.
|
||||||
upstartPath
|
upstartPath
|
||||||
|
|
||||||
|
, # User-supplied command to be run just before Upstart is started.
|
||||||
|
bootLocal ? ""
|
||||||
}:
|
}:
|
||||||
|
|
||||||
substituteAll {
|
substituteAll {
|
||||||
@ -20,4 +23,5 @@ substituteAll {
|
|||||||
udev
|
udev
|
||||||
upstart
|
upstart
|
||||||
];
|
];
|
||||||
|
bootLocal = writeText "boot.local" bootLocal;
|
||||||
}
|
}
|
||||||
|
@ -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"];
|
name = ["networking" "hostName"];
|
||||||
default = "nixos";
|
default = "nixos";
|
||||||
|
@ -248,7 +248,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) substituteAll coreutils
|
inherit (pkgs) substituteAll writeText coreutils
|
||||||
utillinux kernel udev upstart;
|
utillinux kernel udev upstart;
|
||||||
inherit activateConfiguration;
|
inherit activateConfiguration;
|
||||||
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
||||||
@ -259,6 +259,7 @@ rec {
|
|||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
pkgs.upstart
|
pkgs.upstart
|
||||||
];
|
];
|
||||||
|
bootLocal = config.get ["boot" "localCommands"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user