diff options
author | Simon Rettberg | 2024-01-31 17:54:54 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-01-31 17:54:54 +0100 |
commit | acacfde5da4c681eb2bce75e87a10a88e1cd10d3 (patch) | |
tree | 32334922bd48bf36f6178d842729806666565d5a /modules.d/slx-network/hooks/s3-setup-bootif-network.sh | |
parent | [busybox] Split into services (diff) | |
download | systemd-init-acacfde5da4c681eb2bce75e87a10a88e1cd10d3.tar.gz systemd-init-acacfde5da4c681eb2bce75e87a10a88e1cd10d3.tar.xz systemd-init-acacfde5da4c681eb2bce75e87a10a88e1cd10d3.zip |
De-dracutize service-scripts, try to use ash where applicable
Diffstat (limited to 'modules.d/slx-network/hooks/s3-setup-bootif-network.sh')
-rwxr-xr-x | modules.d/slx-network/hooks/s3-setup-bootif-network.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules.d/slx-network/hooks/s3-setup-bootif-network.sh b/modules.d/slx-network/hooks/s3-setup-bootif-network.sh index 6b75170d..1aeac9b6 100755 --- a/modules.d/slx-network/hooks/s3-setup-bootif-network.sh +++ b/modules.d/slx-network/hooks/s3-setup-bootif-network.sh @@ -70,7 +70,7 @@ wait_for_iface() { set -x if ! wait_for_iface "$SLX_PXE_NETIF" 30; then - warn "'$SLX_PXE_NETIF' still not up after 30sec ... trying anyway." + echo "'$SLX_PXE_NETIF' still not up after 30sec ... trying anyway." # TODO handle case where we waited for 30sec and it is still not up fi @@ -78,14 +78,14 @@ fi MAIN_NETIF="$SLX_PXE_NETIF" if [ -n "$SLX_VLAN_ID" ]; then # create VLAN interface - modprobe 8021q || warn "Loading '8021q' failed - missing module?" + modprobe 8021q || echo "Loading '8021q' failed - missing module?" ip link add link "$SLX_PXE_NETIF" name "${SLX_PXE_NETIF}.${SLX_VLAN_ID}" \ type vlan id "$SLX_VLAN_ID" ip link set dev "${SLX_PXE_NETIF}.${SLX_VLAN_ID}" up if wait_for_iface "${SLX_PXE_NETIF}.${SLX_VLAN_ID}"; then MAIN_NETIF="${SLX_PXE_NETIF}.${SLX_VLAN_ID}" else - warn "Setting up VLAN '$SLX_VLAN_ID' failed, trying plain..." + echo "Setting up VLAN '$SLX_VLAN_ID' failed, trying plain..." fi fi @@ -110,7 +110,7 @@ if [ -n "$SLX_BRIDGE" ]; then emergency_shell "Failed to setup main network bridge, giving up!" exit 1 fi - warn "Failed to setup main network bridge on try $try. Retrying ..." + echo "Failed to setup main network bridge on try $try. Retrying ..." # delete bridge, inc try and sleep 100ms before trying again if [ -e "/sys/class/net/${SLX_BRIDGE}" ]; then ip link set dev "$SLX_BRIDGE" down @@ -128,14 +128,14 @@ if [ -n "$SLX_PXE_CLIENT_IP" ] && [ -n "$SLX_PXE_NETMASK" ]; then # now if we got everything from the KCL and skip dhcp if so if [ -n "$SLX_PXE_GATEWAY" ] && [ -n "$SLX_PXE_DNS" ]; then - info "Got network configuration from KCL, skipping DHCP." + echo "Got network configuration from KCL, skipping DHCP." if ! interface="$MAIN_NETIF" \ ip="$SLX_PXE_CLIENT_IP" \ router="$SLX_PXE_GATEWAY" \ dns="$SLX_PXE_DNS" \ hostname="$SLX_PXE_HOSTNAME" \ /usr/local/bin/udhcpc-trigger bound; then - warn "Failed to launch DHCP trigger with KCL configuration - will DHCP." + echo "Failed to launch DHCP trigger with KCL configuration - will DHCP." fi exit 0 fi @@ -182,7 +182,7 @@ for i in 1 1 1 fail; do -s "/usr/local/bin/udhcpc-trigger" \ && break # failed, keep trying... - warn "DHCP failed, retrying in $i sec..." + echo "DHCP failed, retrying in $i sec..." sleep $i done |