From 19bd28dc6738f8bf936235d764711e3637a8c905 Mon Sep 17 00:00:00 2001 From: Marcello Sylvester Bauer Date: Thu, 23 Oct 2025 12:53:20 +0200 Subject: [PATCH] fix(armbian-firstlogin): Enable wlan dhcp by default Currently, WLAN DHCP is only enabled when the value of PRESET_NET_USE_STATIC is explicitly set to 0. It is not enabled when this configuration is uncommented or omitted. This change adjusts the behavior so that DHCP is enabled by default unless a static network configuration is used. Signed-off-by: Marcello Sylvester Bauer --- packages/bsp/common/usr/lib/armbian/armbian-firstlogin | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin index 262331085..01df00e62 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin @@ -51,8 +51,6 @@ createYAML() { local YAML="network:\n" YAML+=" $DEVTYPE:\n" YAML+=" $DEVICE_NAME:\n" - if [[ "${PRESET_NET_USE_STATIC}" == 0 ]]; then YAML+=" dhcp4: yes\n";fi - if [[ "${PRESET_NET_USE_STATIC}" == 0 ]]; then YAML+=" dhcp6: yes\n";fi if [[ "${PRESET_NET_USE_STATIC}" == 1 ]]; then YAML+=" addresses:\n" YAML+=" - $PRESET_NET_STATIC_IP/$PRESET_NET_STATIC_MASK\n" @@ -61,6 +59,9 @@ createYAML() { if [[ -n "${PRESET_NET_STATIC_GATEWAY}" ]]; then YAML+=" via: ${PRESET_NET_STATIC_GATEWAY}\n";fi if [[ -n "${PRESET_NET_STATIC_DNS}" ]]; then YAML+=" nameservers:\n"; fi if [[ -n "${PRESET_NET_STATIC_DNS}" ]]; then YAML+=" addresses: [$PRESET_NET_STATIC_DNS]\n"; fi + else + YAML+=" dhcp4: yes\n" + YAML+=" dhcp6: yes\n" fi if [[ "${PRESET_NET_WIFI_ENABLED}" == 1 ]]; then if [[ -n "${PRESET_NET_WIFI_COUNTRYCODE}" ]]; then YAML+=" regulatory-domain: $PRESET_NET_WIFI_COUNTRYCODE\n"; fi