mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 23:13:56 +00:00
* 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/
|
||||
|
||||
|
||||
# Run any user-specified commands.
|
||||
@shell@ @bootLocal@
|
||||
|
||||
|
||||
# Start an interactive shell.
|
||||
#exec @shell@
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -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"];
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user