Skip to content

Commit 804436f

Browse files
committed
fix(ns-ha): prevent changes from Flashstart
Flashstart hotplug script was messing up DNS configuration even if the service was disabled.
1 parent 4a0fc34 commit 804436f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/ns-ha/files/800-flashstart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ add_sync_file /etc/config/flashstart
1212

1313
if [ "$ACTION" == "NOTIFY_BACKUP" ]; then
1414
update_cron "disable" "flashstart-auth"
15-
# make sure flashstart is disabled, so the firewall can resolve DNS
15+
# make sure flashstart is disabled, so the firewall could eventually resolve DNS (if it has Internet access)
1616
if [ "$(uci -q get flashstart.global.enabled)" == "1" ] && [ "$(uci -q get dhcp.@dnsmasq[0].server)" == "127.0.0.1#5300" ]; then
1717
uci delete dhcp.@dnsmasq[0].server
1818
uci add_list dhcp.@dnsmasq[0].server="1.1.1.1"
1919
uci commit dhcp
2020
fi
2121
elif [ "$ACTION" == "NOTIFY_MASTER" ]; then
22-
uci delete dhcp.@dnsmasq[0].server
23-
uci add_list dhcp.@dnsmasq[0].server="127.0.0.1#5300"
24-
/usr/sbin/flashstart-apply
25-
update_cron "enable" "flashstart-auth"
22+
if [ "$(uci -q get flashstart.global.enabled)" == "1" ]; then
23+
uci delete dhcp.@dnsmasq[0].server
24+
uci add_list dhcp.@dnsmasq[0].server="127.0.0.1#5300"
25+
uci commit dhcp
26+
/usr/sbin/flashstart-apply
27+
update_cron "enable" "flashstart-auth"
28+
fi
2629
fi
2730

2831
keepalived_hotplug

0 commit comments

Comments
 (0)