* Use Upstart instead of sysvinit.
svn path=/nixu/trunk/; revision=7074
This commit is contained in:
parent
29d9b88aa9
commit
d191615e96
@ -82,7 +82,7 @@ rec {
|
|||||||
bootStage2 = import ./boot-stage-2.nix {
|
bootStage2 = import ./boot-stage-2.nix {
|
||||||
inherit (pkgs) genericSubstituter coreutils findutils
|
inherit (pkgs) genericSubstituter coreutils findutils
|
||||||
utillinux kernel sysklogd udev module_init_tools
|
utillinux kernel sysklogd udev module_init_tools
|
||||||
nettools;
|
nettools upstart;
|
||||||
shell = pkgs.bash + "/bin/sh";
|
shell = pkgs.bash + "/bin/sh";
|
||||||
dhcp = pkgs.dhcpWrapper;
|
dhcp = pkgs.dhcpWrapper;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ rec {
|
|||||||
pkgs.shadowutils
|
pkgs.shadowutils
|
||||||
pkgs.strace
|
pkgs.strace
|
||||||
pkgs.sysklogd
|
pkgs.sysklogd
|
||||||
pkgs.sysvinit
|
# pkgs.sysvinit
|
||||||
# pkgs.vim
|
# pkgs.vim
|
||||||
nix
|
nix
|
||||||
nixosInstaller
|
nixosInstaller
|
||||||
|
@ -50,6 +50,8 @@ mkdir -m 0755 -p /nix/var/nix/db
|
|||||||
mkdir -m 0755 -p /nix/var/nix/gcroots
|
mkdir -m 0755 -p /nix/var/nix/gcroots
|
||||||
mkdir -m 0755 -p /nix/var/nix/temproots
|
mkdir -m 0755 -p /nix/var/nix/temproots
|
||||||
|
|
||||||
|
mkdir -m 0755 -p /var/log
|
||||||
|
|
||||||
|
|
||||||
# Ensure that the module tools can find the kernel modules.
|
# Ensure that the module tools can find the kernel modules.
|
||||||
export MODULE_DIR=@kernel@/lib/modules/
|
export MODULE_DIR=@kernel@/lib/modules/
|
||||||
@ -109,10 +111,18 @@ if ! test -e /etc/group; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Set up inittab.
|
# Set up the Upstart jobs.
|
||||||
echo -n > /etc/inittab
|
export UPSTART_CFG_DIR=/etc/event.d
|
||||||
|
mkdir -p $UPSTART_CFG_DIR
|
||||||
|
|
||||||
|
cp -f @upstart@/etc/event.d/logd $UPSTART_CFG_DIR/logd
|
||||||
|
|
||||||
for i in $(seq 1 6); do
|
for i in $(seq 1 6); do
|
||||||
echo "$i:2345:respawn:@mingetty@/sbin/mingetty --noclear tty$i" >> /etc/inittab
|
cat > $UPSTART_CFG_DIR/tty$i <<EOF
|
||||||
|
start on startup
|
||||||
|
stop on shutdown
|
||||||
|
respawn @mingetty@/sbin/mingetty --noclear tty$i
|
||||||
|
EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
@ -146,8 +156,8 @@ hostname nixos
|
|||||||
|
|
||||||
|
|
||||||
# Start an interactive shell.
|
# Start an interactive shell.
|
||||||
#exec @shell@
|
@shell@ &
|
||||||
|
|
||||||
|
|
||||||
# Start init.
|
# Start Upstart's init.
|
||||||
exec init 2
|
exec @upstart@/sbin/init -v
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ genericSubstituter, shell, coreutils, findutils
|
{ genericSubstituter, shell, coreutils, findutils
|
||||||
, utillinux, kernel, sysklogd, mingetty, udev
|
, utillinux, kernel, sysklogd, mingetty, udev
|
||||||
, module_init_tools, nettools, dhcp
|
, module_init_tools, nettools, dhcp, upstart
|
||||||
, path ? []
|
, path ? []
|
||||||
|
|
||||||
, # Whether the root device is root only. If so, we'll mount a
|
, # Whether the root device is root only. If so, we'll mount a
|
||||||
@ -11,7 +11,7 @@
|
|||||||
genericSubstituter {
|
genericSubstituter {
|
||||||
src = ./boot-stage-2-init.sh;
|
src = ./boot-stage-2-init.sh;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit shell kernel sysklogd mingetty readOnlyRoot;
|
inherit shell kernel sysklogd mingetty upstart readOnlyRoot;
|
||||||
path = [
|
path = [
|
||||||
coreutils
|
coreutils
|
||||||
findutils
|
findutils
|
||||||
@ -20,6 +20,7 @@ genericSubstituter {
|
|||||||
module_init_tools
|
module_init_tools
|
||||||
nettools
|
nettools
|
||||||
dhcp
|
dhcp
|
||||||
|
upstart
|
||||||
];
|
];
|
||||||
extraPath = path;
|
extraPath = path;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user