]> git.proxmox.com Git - pve-installer.git/blobdiff - unconfigured.sh
install module: getters: correctly use plural in error messages
[pve-installer.git] / unconfigured.sh
index b8e10ea5f3db1368f561220f1e017eda901e8268..a39e6ad774baf8a4949c4aa8e47531dd8fd8c01a 100755 (executable)
@@ -12,13 +12,13 @@ parse_cmdline() {
     # shellcheck disable=SC2013 # per word splitting is wanted here
     for par in $(cat /proc/cmdline); do
         case $par in
-            proxdebug)
+            proxdebug|proxmox-debug)
                 proxdebug=1
             ;;
-            proxtui)
+            proxtui|proxmox-tui-mode)
                 proxtui=1
             ;;
-            proxauto)
+            proxauto|proxmox-start-auto-installer)
                 start_auto_installer=1
             ;;
             console=ttyS*)
@@ -214,10 +214,11 @@ fi
 
 # add custom DHCP options for auto installer
 if [ $start_auto_installer -ne 0 ]; then
+    echo "Preparing DHCP as potential source to get location of automatic-installation answer file"
     cat >> /etc/dhcp/dhclient.conf <<EOF
-option proxmoxinst-url code 250 = text;
-option proxmoxinst-fp code 251 = text;
-also request proxmoxinst-url, proxmoxinst-fp;
+option proxmox-auto-installer-manifest-url code 250 = text;
+option proxmox-auto-installer-cert-fingerprint code 251 = text;
+also request proxmox-auto-installer-manifest-url, proxmox-auto-installer-cert-fingerprint;
 EOF
 fi
 
@@ -240,8 +241,17 @@ if [ $proxtui -ne 0 ]; then
 elif [ $start_auto_installer -ne 0 ]; then
     echo "Caching device info from udev"
     /usr/bin/proxmox-low-level-installer dump-udev
-    echo "Fetching answers for automatic installation"
-    /usr/bin/proxmox-fetch-answer >/run/automatic-installer-answers
+
+    if [ -f /cdrom/auto-installer-mode.toml ]; then
+        echo "Fetching answers for automatic installation"
+        /usr/bin/proxmox-fetch-answer >/run/automatic-installer-answers
+    else
+        printf "\nAutomatic installation selected but no config for fetching the answer file found!\n"
+        echo "Starting debug shell, to fetch the answer file manually use:"
+        echo "  proxmox-fetch-answer MODE >/run/automatic-installer-answers"
+        echo "and enter 'exit' or press 'CTRL' + 'D' when finished."
+        debugsh || true
+    fi
     echo "Starting automatic installation"
     /usr/bin/proxmox-auto-installer </run/automatic-installer-answers
 else