From aa45380906051e67cf803f05d379b662e10258d7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 26 Jul 2024 15:16:22 +0200 Subject: [dnbd3-proxy-mode] Wait for additional interfaces to get configured --- .../data/opt/openslx/scripts/systemd-setup_dnbd3_proxy | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy index f420bdc6..b91deb20 100755 --- a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy +++ b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy @@ -194,8 +194,15 @@ else fi MAX_REPLICATION_SIZE=$(( disksize / 6 )) - [ "$MAX_REPLICATION_SIZE" -lt 100 ] && MAX_REPLICATION_SIZE=100 - + (( MAX_REPLICATION_SIZE < 100 )) && MAX_REPLICATION_SIZE=100 + + # If we seem to have additional interfaces, wait a bit to make sure they get configured + sleep 1 + numifs=$( systemctl list-units --legend=false "udhcpc@*" | wc -l ) + if (( numifs > 1 )); then + echo "Waiting a bit since I see $numifs interfaces" + sleep 10 + fi MY_IPS=$( ip a | grep '^\s*inet\s' | awk '$2 !~ /^127\./ {print $2}' | awk -F/ '{print $1}' ) add_alt_server 'all' "Config, for client and server" ${SLX_DNBD3_PUBLIC} add_alt_server 'replication' "Config, for replication only" ${SLX_DNBD3_PRIVATE} -- cgit v1.2.3-55-g7522