diff --git a/Makefile b/Makefile index c2da6374..5284b930 100644 --- a/Makefile +++ b/Makefile @@ -269,6 +269,13 @@ headless: image.iso -nographic -no-reboot \ -fw_cfg name=opt/org.toaruos.bootmode,string=headless +.PHONY: shell +shell: image.iso + @qemu-system-i386 -cdrom $< ${QEMU_ARGS} \ + -nographic -no-reboot \ + -fw_cfg name=opt/org.toaruos.bootmode,string=headless \ + -fw_cfg name=opt/org.toaruos.forceuser,string=local + .PHONY: efi64 efi64: image.iso qemu-system-x86_64 -cdrom $< ${QEMU_ARGS} \ diff --git a/base/etc/startup.d/98_qemu_login.sh b/base/etc/startup.d/98_qemu_login.sh new file mode 100755 index 00000000..76119f81 --- /dev/null +++ b/base/etc/startup.d/98_qemu_login.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +export-cmd QEMU_USER qemu-fwcfg opt/org.toaruos.forceuser + +if empty? "$QEMU_USER" then true else /bin/getty -a "$QEMU_USER" +if empty? "$QEMU_USER" then true else reboot +