* 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:
parent
5cf8604b1e
commit
0a0260514d
@ -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
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ export MODULE_DIR=@kernel@/lib/modules/
|
|||||||
|
|
||||||
|
|
||||||
# Run any user-specified commands.
|
# Run any user-specified commands.
|
||||||
@shell@ @bootLocal@
|
@shell@ @postBootCommands@
|
||||||
|
|
||||||
|
|
||||||
# Start Upstart's init. We start it through the
|
# Start Upstart's init. We start it through the
|
||||||
|
@ -4,12 +4,13 @@ let
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
boot.localCommands = pkgs.lib.mkOption {
|
boot.postBootCommands = pkgs.lib.mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
example = "text=anything; echo You can put $text here.";
|
example = "rm -f /var/log/messages";
|
||||||
description = "
|
merge = pkgs.lib.mergeStringOption;
|
||||||
|
description = ''
|
||||||
Shell commands to be executed just before Upstart is started.
|
Shell commands to be executed just before Upstart is started.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -19,28 +20,27 @@ let
|
|||||||
activateConfiguration = config.system.activationScripts.script;
|
activateConfiguration = config.system.activationScripts.script;
|
||||||
|
|
||||||
# Path for Upstart jobs. Should be quite minimal.
|
# Path for Upstart jobs. Should be quite minimal.
|
||||||
upstartPath = [
|
upstartPath =
|
||||||
pkgs.coreutils
|
[ pkgs.coreutils
|
||||||
pkgs.findutils
|
pkgs.findutils
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
pkgs.upstart
|
pkgs.upstart
|
||||||
];
|
];
|
||||||
|
|
||||||
bootLocal = config.boot.localCommands;
|
|
||||||
|
|
||||||
bootStage2 = substituteAll {
|
bootStage2 = substituteAll {
|
||||||
src = ./stage-2-init.sh;
|
src = ./stage-2-init.sh;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit kernel upstart activateConfiguration upstartPath;
|
inherit kernel upstart activateConfiguration upstartPath;
|
||||||
path = [
|
path =
|
||||||
coreutils
|
[ coreutils
|
||||||
utillinux
|
utillinux
|
||||||
udev
|
udev
|
||||||
upstart
|
upstart
|
||||||
];
|
];
|
||||||
bootLocal = writeText "local-cmds" bootLocal;
|
postBootCommands = writeText "local-cmds" config.boot.postBootCommands;
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user