From f8f055661deb14d6bf67d652dbea633eb21d1e51 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 27 Aug 2019 12:54:43 +0200 Subject: [slx-network] support for hostname via KCL --- builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3 b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3 index 4760b5f9..ee870873 100755 --- a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3 +++ b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3 @@ -105,6 +105,12 @@ if [ -n "$ntpsrv" ]; then fi # Hostname +# Ignore it if hostname was forced per KCL +if [ -n "$SLX_PXE_HOSTNAME" ]; then + echo "Hostname set via KCL, ignoring DHCP hostname: '$hostname'" + hostname="$SLX_PXE_HOSTNAME" +fi + if [ -z "$hostname" ]; then # as with domain, if there's no hostname, try to get via DNS echo "..trying to get hostname via DNS, as DHCP didn't supply one.." -- cgit v1.2.3-55-g7522