From d191615e96a342f3ca9871cd3a2418b46f306553 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 19 Nov 2006 18:16:29 +0000 Subject: [PATCH] * Use Upstart instead of sysvinit. svn path=/nixu/trunk/; revision=7074 --- test/boot-environment.nix | 4 ++-- test/boot-stage-2-init.sh | 22 ++++++++++++++++------ test/boot-stage-2.nix | 5 +++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/test/boot-environment.nix b/test/boot-environment.nix index 6b250b33585a..4d4d98a0ed51 100644 --- a/test/boot-environment.nix +++ b/test/boot-environment.nix @@ -82,7 +82,7 @@ rec { bootStage2 = import ./boot-stage-2.nix { inherit (pkgs) genericSubstituter coreutils findutils utillinux kernel sysklogd udev module_init_tools - nettools; + nettools upstart; shell = pkgs.bash + "/bin/sh"; dhcp = pkgs.dhcpWrapper; @@ -108,7 +108,7 @@ rec { pkgs.shadowutils pkgs.strace pkgs.sysklogd - pkgs.sysvinit +# pkgs.sysvinit # pkgs.vim nix nixosInstaller diff --git a/test/boot-stage-2-init.sh b/test/boot-stage-2-init.sh index 6bfff35f2248..a80ee2aaa59d 100644 --- a/test/boot-stage-2-init.sh +++ b/test/boot-stage-2-init.sh @@ -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/temproots +mkdir -m 0755 -p /var/log + # Ensure that the module tools can find the kernel modules. export MODULE_DIR=@kernel@/lib/modules/ @@ -109,10 +111,18 @@ if ! test -e /etc/group; then fi -# Set up inittab. -echo -n > /etc/inittab +# Set up the Upstart jobs. +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 - echo "$i:2345:respawn:@mingetty@/sbin/mingetty --noclear tty$i" >> /etc/inittab + cat > $UPSTART_CFG_DIR/tty$i <