all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pve-installer] fix #5583: add dhclient options in kernel cmdline
@ 2026-11-17  5:57 Romain Lebbadi-Breteau
  0 siblings, 0 replies; only message in thread
From: Romain Lebbadi-Breteau @ 2026-11-17  5:57 UTC (permalink / raw)
  To: pve-devel

This applies the patch proposed in bug report #5583 
(https://bugzilla.proxmox.com/attachment.cgi?id=1421).
I built the proxmox-installer.deb package, extracted it in 
pve-installer.squashfs in a live ISO and tested
it in a virtual machine. The command-line arguments work as expected, 
and allow for a bigger timeout
especially when using a switch with STP.
Signed-off-by: Romain Lebbadi-Breteau <romain.lebbadi-breteau at polymtl.ca>
---
  unconfigured.sh | 43 ++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/unconfigured.sh b/unconfigured.sh
index 31fcfca..76b2d00 100755
--- a/unconfigured.sh
+++ b/unconfigured.sh
@@ -13,6 +13,16 @@parse_cmdline() {
      proxtui=0
      serial=0
      live_vlan_id=
+
+    # these are the original defaults from the stock proxmox dhclient.conf
+    dhclient_timeout=10
+    dhclient_initial_interval=3
+    dhclient_initial_delay=0
+    dhclient_select_timeout=0
+
+    # these are defaults from the dhclient.conf man page
+    dhclient_retry=300
+
      # shellcheck disable=SC2013 # per word splitting is wanted here
      for par in $(cat /proc/cmdline); do
          case $par in
@@ -31,10 +41,39 @@parse_cmdline() {
              proxmox-vlan=*)
                  live_vlan_id=${par#proxmox-vlan=}
              ;;
+            dhclient_timeout=*)
+                dhclient_timeout=${par#dhclient_timeout=}
+            ;;
+            dhclient_initial_interval=*)
+                dhclient_initial_interval=${par#dhclient_initial_interval=}
+            ;;
+            dhclient_initial_delay=*)
+                dhclient_initial_delay=${par#dhclient_initial_delay=}
+            ;;
+            dhclient_select_timeout=*)
+                dhclient_select_timeout=${par#dhclient_select_timeout=}
+            ;;
+            dhclient_retry=*)
+                dhclient_retry=${par#dhclient_retry=}
+            ;;
+
          esac
      done;
  }
+create_dhclient_conf() {
+    # create a new dhclient.conf file based on values from
+    # above, either defaults or read from cmdline
+    cat > /etc/dhcp/dhclient.conf <<EOF
+timeout ${dhclient_timeout};
+initial-interval ${dhclient_initial_interval};
+initial-delay ${dhclient_initial_delay};
+select-timeout ${dhclient_select_timeout};
+retry ${dhclient_retry};
+
+EOF
+}
+
  debugsh() {
      /bin/bash
  }
@@ -272,6 +311,8 @@mkdir -p /run/proxmox-installer
  parse_cmdline
+create_dhclient_conf
+
  # always load most common input drivers
  modprobe -q psmouse || true
  modprobe -q sermouse ||  true
@@ -451,7 +492,7 @@fi
  # just to be sure everything is on disk
  sync
-if [ $proxdebug -ne 0 ]; then
+if [ $proxdebug -ne 0 ]; then
      printf "\nDebug shell after installation exited (type exit or 
CTRL-D to reboot)\n"
      debugsh || true
  fi
-- 
2.43.0





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-17  6:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17  5:57 [PATCH pve-installer] fix #5583: add dhclient options in kernel cmdline Romain Lebbadi-Breteau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal