mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
cache-domains: Improved ifup hotplug reliability
I've noticed that in deployment on some reboots it won't configure, This seems to be due to running before the system/network is ready. Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
source /lib/functions/network.sh
|
||||
. /lib/functions/network.sh
|
||||
network_find_wan WAN_IFACE
|
||||
|
||||
if [ "${ACTION}" == "ifup" ] && [ "${INTERFACE}" == "${WAN_IFACE}" ] && [ ! -d /var/cache-domains ]; then
|
||||
/usr/bin/cache-domains configure
|
||||
if [ "${ACTION}" = "ifup" ] && [ "${INTERFACE}" = "${WAN_IFACE}" ] && [ ! -d /var/cache-domains ]; then
|
||||
for ATTEMPT in $(seq 1 3); do
|
||||
if /usr/bin/cache-domains configure; then
|
||||
break
|
||||
else
|
||||
sleep 30
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user