[pve-devel] [PATCH installer] fix #2804: add a root shell on tty3

Stoiko Ivanov s.ivanov at proxmox.com
Fri Jun 19 16:25:45 CEST 2020


Tested locally in a VM:
The setsid was necessary to give the bash job-control (otherwise Ctrl+C would
simply kill the shell).

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 unconfigured.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/unconfigured.sh b/unconfigured.sh
index ed492c9..e36ffc9 100755
--- a/unconfigured.sh
+++ b/unconfigured.sh
@@ -107,6 +107,9 @@ echo -n "Attempting to get DHCP leases... "
 dhclient -v
 echo "done"
 
+echo "Starting a root shell on tty3."
+setsid /sbin/agetty -a root --noclear tty3 &
+
 xinit -- -dpi 96 >/dev/tty2 2>&1
 
 # just to be sure everything is on disk
-- 
2.20.1





More information about the pve-devel mailing list