mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
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.
This commit is contained in:
parent
e82b011f20
commit
1e74f24e1c
1 changed files with 10 additions and 10 deletions
|
|
@ -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 &
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue