Spawn mulitple ttys when system boots
This commit is contained in:
parent
e2ffdf1c46
commit
fa1fb6f8ae
|
|
@ -21,7 +21,7 @@ kcmd_args = [
|
|||
"PATH=/bin:/benchmark",
|
||||
"init=/usr/bin/busybox",
|
||||
]
|
||||
init_args = ["sh", "-l"]
|
||||
init_args = ["/init"]
|
||||
initramfs = "test/initramfs/build/initramfs.cpio.gz"
|
||||
|
||||
# Special options for testing
|
||||
|
|
|
|||
|
|
@ -22,7 +22,14 @@
|
|||
shell = "${pkgs.bash}/bin/bash";
|
||||
hashedPassword = null;
|
||||
};
|
||||
systemd.targets.getty.wants = [ "autovt@hvc0.service" ];
|
||||
systemd.targets.getty.wants = [
|
||||
"autovt@hvc0.service"
|
||||
"getty@tty2.service"
|
||||
"getty@tty3.service"
|
||||
"getty@tty4.service"
|
||||
"getty@tty5.service"
|
||||
"getty@tty6.service"
|
||||
];
|
||||
|
||||
systemd.extraConfig = ''
|
||||
LogLevel=crit
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ in stdenvNoCC.mkDerivation {
|
|||
|
||||
cp -r ${etc}/* $out/etc/
|
||||
|
||||
cp ${./../src/init} $out/init
|
||||
chmod +x $out/init
|
||||
|
||||
cp ${resolv_conf}/resolv.conf $out/etc/
|
||||
|
||||
${lib.optionalString (apps != null) ''
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
hvc0::respawn:/bin/sh
|
||||
tty1::askfirst:/bin/cttyhack /bin/sh
|
||||
tty2::askfirst:/bin/cttyhack /bin/sh
|
||||
tty3::askfirst:/bin/cttyhack /bin/sh
|
||||
tty4::askfirst:/bin/cttyhack /bin/sh
|
||||
tty5::askfirst:/bin/cttyhack /bin/sh
|
||||
tty6::askfirst:/bin/cttyhack /bin/sh
|
||||
|
||||
# Stuff to do when restarting the init process
|
||||
::restart:/bin/init
|
||||
|
||||
# Stuff to do before rebooting
|
||||
::ctrlaltdel:/bin/reboot
|
||||
::shutdown:/bin/umount -a -r
|
||||
::shutdown:/bin/swapoff -a
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Start the init process
|
||||
exec /bin/init
|
||||
Loading…
Reference in New Issue