diff options
Diffstat (limited to 'builder/modules.d/slx-network/scripts/setup-bootif-network.stage4')
-rwxr-xr-x | builder/modules.d/slx-network/scripts/setup-bootif-network.stage4 | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/builder/modules.d/slx-network/scripts/setup-bootif-network.stage4 b/builder/modules.d/slx-network/scripts/setup-bootif-network.stage4 deleted file mode 100755 index 61f925d0..00000000 --- a/builder/modules.d/slx-network/scripts/setup-bootif-network.stage4 +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# This script sets up the main network interface we booted from, -# as designated by SLX_PXE_NETIF in /opt/openslx/config -# It will run on either the bridge (SLX_BRIDGE is set) or the -# physical interface directly. - -export PATH=$PATH:/opt/openslx/sbin:/opt/openslx/bin - -. /opt/openslx/config - -if [ -z "$SLX_PXE_NETIF" ]; then - echo "Missing network information of the main boot interface." - exit 1 -fi - -MAIN_NETIF="$SLX_PXE_NETIF" -[ -n "$SLX_VLAN_ID" ] && MAIN_NETIF="${SLX_PXE_NETIF}.${SLX_VLAN_ID}" -[ -n "$SLX_BRIDGE" ] && MAIN_NETIF="${SLX_BRIDGE}" -readonly MAIN_NETIF - -# set default options -declare -a udhcpc_opts -udhcpc_opts+=("-t" "8") -udhcpc_opts+=("-O" "domain") -udhcpc_opts+=("-O" "nissrv") -udhcpc_opts+=("-O" "nisdomain") -udhcpc_opts+=("-O" "wpad") -udhcpc_opts+=("-O" "search") -udhcpc_opts+=("-O" "wins") - -# send machine uuid during DHCP if configured -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" - udhcpc_opts+=( "-x" "0x3d:$uid" ) - fi -fi - -mkdir -p /run/udhcpc || echo "Could not create '/run/udhcpc'." - -udhcpc "${udhcpc_opts[@]}" \ - -i "$MAIN_NETIF" \ - -r "${SLX_PXE_CLIENT_IP}" \ - -s /opt/openslx/scripts/udhcpc-trigger \ - -p "/run/udhcpc/udhcpc.${MAIN_NETIF}.pid" -ret=$? - -if [ "${ret}" != 0 ]; then - echo "udhcpc" "Could not run 'udhcpc ${udhcpc_opts[*]}' on ${MAIN_NETIF}." -fi - -exit "${ret}" - |