diff options
author | Jonathan Bauer | 2019-08-27 12:54:43 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-08-27 12:54:43 +0200 |
commit | f8f055661deb14d6bf67d652dbea633eb21d1e51 (patch) | |
tree | 95e6607eddaa7fcc6c2f3e44ee86fe2f37141ad8 /builder/modules.d/slx-network/scripts | |
parent | [slx-network] add comment sections (diff) | |
download | systemd-init-f8f055661deb14d6bf67d652dbea633eb21d1e51.tar.gz systemd-init-f8f055661deb14d6bf67d652dbea633eb21d1e51.tar.xz systemd-init-f8f055661deb14d6bf67d652dbea633eb21d1e51.zip |
[slx-network] support for hostname via KCL
Diffstat (limited to 'builder/modules.d/slx-network/scripts')
-rwxr-xr-x | builder/modules.d/slx-network/scripts/udhcpc-trigger.stage3 | 6 |
1 files changed, 6 insertions, 0 deletions
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.." |