summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcore/modules/dhcpc-busybox/data/opt/openslx/scripts/systemd-udhcpc++2
-rw-r--r--core/rootfs/rootfs-stage31/data/inc/parse_kcl4
-rw-r--r--core/rootfs/rootfs-stage31/data/inc/setup_network12
3 files changed, 12 insertions, 6 deletions
diff --git a/core/modules/dhcpc-busybox/data/opt/openslx/scripts/systemd-udhcpc++ b/core/modules/dhcpc-busybox/data/opt/openslx/scripts/systemd-udhcpc++
index 4487b2c8..7d7dfc68 100755
--- a/core/modules/dhcpc-busybox/data/opt/openslx/scripts/systemd-udhcpc++
+++ b/core/modules/dhcpc-busybox/data/opt/openslx/scripts/systemd-udhcpc++
@@ -13,7 +13,7 @@ fi
primary="br0"
[ -n "$SLX_BRIDGE" ] && primary="$SLX_BRIDGE"
-if [ "$primary" = "$net_if" ]; then
+if [ "$primary" = "$net_if" ] && [ "$SLX_NET_DHCP_UUID" = "yes" ]; then
uid=$(dmidecode -s system-uuid | sed -r 's/^(..)(..)(..)(..)-(..)(..)-(..)(..)-(....)-/00\4\3\2\1\6\5\8\7\9/')
if [ "${#uid}" = 34 ]; then
echo "Using SMBIOS uid for DHCP"
diff --git a/core/rootfs/rootfs-stage31/data/inc/parse_kcl b/core/rootfs/rootfs-stage31/data/inc/parse_kcl
index e0f5a752..95f7daf5 100644
--- a/core/rootfs/rootfs-stage31/data/inc/parse_kcl
+++ b/core/rootfs/rootfs-stage31/data/inc/parse_kcl
@@ -47,6 +47,10 @@ for opts in ${KCL}; do
GFX=amdgpu ;;
radeon)
GFX=radeon ;;
+ dhcpuuid)
+ USE_DHCP_UUID=yes
+ echo "SLX_NET_DHCP_UUID='yes'" >> "/run/config"
+ ;;
esac
done
diff --git a/core/rootfs/rootfs-stage31/data/inc/setup_network b/core/rootfs/rootfs-stage31/data/inc/setup_network
index 6787027d..1f7b2ec0 100644
--- a/core/rootfs/rootfs-stage31/data/inc/setup_network
+++ b/core/rootfs/rootfs-stage31/data/inc/setup_network
@@ -102,10 +102,12 @@ if [ -n "$GATEWAY" ]; then
echo -n "$GATEWAY" > "/run/firstgw"
fi
-UID=$(dmidecode -s system-uuid | sed -r 's/^(..)(..)(..)(..)-(..)(..)-(..)(..)-(....)-/00\4\3\2\1\6\5\8\7\9/')
-if [ "${#UID}" = 34 ]; then
- echo "Using SMBIOS UID for DHCP"
- PARAM="$PARAM -x 0x3d:$UID"
+if [ "$USE_DHCP_UUID" = "yes" ]; then
+ UID=$(dmidecode -s system-uuid | sed -r 's/^(..)(..)(..)(..)-(..)(..)-(..)(..)-(....)-/00\4\3\2\1\6\5\8\7\9/')
+ if [ "${#UID}" = 34 ]; then
+ echo "Using SMBIOS UID for DHCP"
+ PARAM="$PARAM -x 0x3d:$UID"
+ fi
fi
# save our variables for retry on fail ff.
@@ -114,7 +116,7 @@ echo "GATEWAY=$GATEWAY" >> /run/network.conf
echo "BRIDGE=$BRIDGE" >> /run/network.conf
echo "UID=$UID" >> /run/network.conf
-udhcpc $PARAM -x "0x3d:$UID" -O ntpsrv -O domain -O wpad -O search -t 4 -T 3 -s "/inc/udhcpc-trigger" -f -n -q -i "$BRIDGE"
+udhcpc $PARAM -O ntpsrv -O domain -O wpad -O search -t 4 -T 3 -s "/inc/udhcpc-trigger" -f -n -q -i "$BRIDGE"
URET=$?
# udhcpc return value will be return value of this script
[ -z "$CLIENTIP" ] && CLIENTIP=$(cat /run/firstip)