From 1e74f24e1c17276da45914d1c268adaed2b0d040 Mon Sep 17 00:00:00 2001 From: Markus Gothe Date: Fri, 3 Feb 2023 11:35:45 +0100 Subject: [PATCH] xmpcc: Fix hotplug-script so it is executed. Use of 'local' outside of a function makes the script halt and never get to the point where it reloads xmppc. --- xmppc/files/etc/hotplug.d/iface/91-icwmp_xmpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xmppc/files/etc/hotplug.d/iface/91-icwmp_xmpp b/xmppc/files/etc/hotplug.d/iface/91-icwmp_xmpp index 10610a2c8..bbce901f6 100644 --- a/xmppc/files/etc/hotplug.d/iface/91-icwmp_xmpp +++ b/xmppc/files/etc/hotplug.d/iface/91-icwmp_xmpp @@ -2,20 +2,20 @@ [ -f /etc/config/xmpp ] || exit 0 -[ "$ACTION" == "ifup" ] || exit 0 -[ "$INTERFACE" == "loopback" ] && exit 0 +[ "$ACTION" = "ifup" ] || exit 0 +[ "$INTERFACE" = "loopback" ] && exit 0 -local defwan=$(uci -q get cwmp.cpe.default_wan_interface) -[ -n "$defwan" -a "$(uci -q get network.$defwan)" == "interface" -a "$defwan" != "$INTERFACE" ] && exit 0 +DEFWAN=$(uci -q get cwmp.cpe.default_wan_interface) +[ -n "$DEFWAN" -a "$(uci -q get network.${DEFWAN})" = "interface" -a "$DEFWAN" != "$INTERFACE" ] && exit 0 -local islan="$(uci -q get network.$INTERFACE.is_lan)" -[ "$islan" == "1" ] && exit 0 +ISLAN="$(uci -q get network.${INTERFACE}.is_lan)" +[ "$ISLAN" = "1" ] && exit 0 -local proto="$(uci -q get network.$INTERFACE.proto)" -[ "$proto" == "none" ] && exit 0 +PROTO="$(uci -q get network.${INTERFACE}.proto)" +[ "$PROTO" = "none" ] && exit 0 -local ifname="$(uci -q get network.$INTERFACE.ifname)" -[ "${ifname:0:1}" == "@" ] && exit 0 +IFNAME="$(uci -q get network.${INTERFACE}.ifname)" +[ "${IFNAME:0:1}" = "@" ] && exit 0 /etc/init.d/xmppc reload &