]> git.proxmox.com Git - pve-installer.git/blobdiff - unconfigured.sh
tui: install_progress: handle errors in ui message loop more gracefully
[pve-installer.git] / unconfigured.sh
index ce72da99298c9911250ab26d3104e768e6431410..ba9b9e33722df2d674eca9e171c0b8b322b6b0cc 100755 (executable)
@@ -6,11 +6,15 @@ trap "err_reboot" ERR
 
 parse_cmdline() {
     proxdebug=0
+    proxtui=0
     # shellcheck disable=SC2013 # per word splitting is wanted here
     for par in $(cat /proc/cmdline); do
         case $par in
             proxdebug)
-            proxdebug=1
+                proxdebug=1
+            ;;
+            proxtui)
+                proxtui=1
             ;;
         esac
     done;
@@ -132,6 +136,7 @@ if [ -d /sys/firmware/efi ]; then
     mount -n -t efivarfs efivarfs /sys/firmware/efi/efivars
 fi
 mount -n -t tmpfs tmpfs /run
+mkdir -p /run/proxmox-installer
 
 parse_cmdline
 
@@ -203,8 +208,15 @@ chronyd || echo "starting chrony failed ($?)"
 echo "Starting a root shell on tty3."
 setsid /sbin/agetty -a root --noclear tty3 &
 
-echo "Starting the installer GUI - see tty2 (CTRL+ALT+F2) for any errors..."
-xinit -- -dpi "$DPI" >/dev/tty2 2>&1
+/usr/bin/proxmox-low-level-installer dump-env
+
+if [ $proxtui -ne 0 ]; then
+    echo "Starting the TUI installer"
+    /usr/bin/proxmox-tui-installer 2>/dev/tty2
+else
+    echo "Starting the installer GUI - see tty2 (CTRL+ALT+F2) for any errors..."
+    xinit -- -dpi "$DPI" >/dev/tty2 2>&1
+fi
 
 # just to be sure everything is on disk
 sync