* Simplification.
svn path=/nixu/trunk/; revision=7076
This commit is contained in:
parent
fb4ab4bc8e
commit
70aca5974c
@ -81,25 +81,29 @@ rec {
|
||||
upstartJobs = import ./upstart-jobs/gather.nix {
|
||||
inherit (pkgs) stdenv;
|
||||
|
||||
jobs = [
|
||||
# For the builtin logd job.
|
||||
pkgs.upstart
|
||||
|
||||
# The terminals on ttyX.
|
||||
(map
|
||||
(ttyNumber: import ./upstart-jobs/mingetty.nix {
|
||||
inherit (pkgs) genericSubstituter;
|
||||
mingetty = pkgs.mingettyWrapper;
|
||||
inherit ttyNumber;
|
||||
})
|
||||
[1 2 3 4 5 6]
|
||||
)
|
||||
|
||||
jobs = map makeJob [
|
||||
# Syslogd.
|
||||
(import ./upstart-jobs/syslogd.nix {
|
||||
inherit (pkgs) genericSubstituter sysklogd;
|
||||
inherit (pkgs) sysklogd;
|
||||
})
|
||||
];
|
||||
]
|
||||
|
||||
# The terminals on ttyX.
|
||||
++ (map
|
||||
(ttyNumber: makeJob (import ./upstart-jobs/mingetty.nix {
|
||||
mingetty = pkgs.mingettyWrapper;
|
||||
inherit ttyNumber;
|
||||
}))
|
||||
[1 2 3 4 5 6]
|
||||
)
|
||||
|
||||
# For the builtin logd job.
|
||||
++ [pkgs.upstart];
|
||||
};
|
||||
|
||||
|
||||
makeJob = import ./upstart-jobs/make-job.nix {
|
||||
inherit (pkgs) stdenv;
|
||||
};
|
||||
|
||||
|
||||
|
7
test/upstart-jobs/make-job.nix
Normal file
7
test/upstart-jobs/make-job.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{stdenv}: job:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit (job) name job;
|
||||
builder = builtins.toFile "builder.sh"
|
||||
"source $stdenv/setup; ensureDir $out/etc/event.d; echo \"$job\" > $out/etc/event.d/$name";
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
{genericSubstituter, mingetty, ttyNumber}:
|
||||
{mingetty, ttyNumber}:
|
||||
|
||||
genericSubstituter {
|
||||
src = ./mingetty.sh;
|
||||
dir = "etc/event.d";
|
||||
{
|
||||
name = "tty" + toString ttyNumber;
|
||||
inherit mingetty ttyNumber;
|
||||
job = "
|
||||
start on startup
|
||||
stop on shutdown
|
||||
respawn ${mingetty}/sbin/mingetty --noclear tty${toString ttyNumber}
|
||||
";
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
start on startup
|
||||
stop on shutdown
|
||||
respawn @mingetty@/sbin/mingetty --noclear tty@ttyNumber@
|
@ -1,8 +1,10 @@
|
||||
{genericSubstituter, sysklogd}:
|
||||
{sysklogd}:
|
||||
|
||||
genericSubstituter {
|
||||
src = ./syslogd.sh;
|
||||
dir = "etc/event.d";
|
||||
{
|
||||
name = "syslogd";
|
||||
inherit sysklogd;
|
||||
job = "
|
||||
start on startup
|
||||
stop on shutdown
|
||||
respawn ${sysklogd}/sbin/syslogd -n
|
||||
";
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
start on startup
|
||||
stop on shutdown
|
||||
respawn @sysklogd@/sbin/syslogd -n
|
Loading…
Reference in New Issue
Block a user