6relayd: try to workaround race condition at startup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39184 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
b77e0ece62
commit
51b9513ec5
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=6relayd
|
PKG_NAME:=6relayd
|
||||||
PKG_VERSION:=2013-10-21
|
PKG_VERSION:=2013-10-21.1
|
||||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
|
|
|
@ -34,7 +34,7 @@ start_6relayd() {
|
||||||
local master masterif
|
local master masterif
|
||||||
config_get masterif "$cfg" master
|
config_get masterif "$cfg" master
|
||||||
network_get_device master "$masterif"
|
network_get_device master "$masterif"
|
||||||
[ -z "$master" ] && master="."
|
[ -z "$master" -o "$master" = "$masterif" ] && master="."
|
||||||
|
|
||||||
# Detect slave interfaces
|
# Detect slave interfaces
|
||||||
local slaves=""
|
local slaves=""
|
||||||
|
@ -45,10 +45,10 @@ start_6relayd() {
|
||||||
network_get_device slave "$slaveif"
|
network_get_device slave "$slaveif"
|
||||||
# Compatibility with old config format
|
# Compatibility with old config format
|
||||||
if [ "$mode" = "relay" -a "$master" = "." ]; then
|
if [ "$mode" = "relay" -a "$master" = "." ]; then
|
||||||
[ -z "$slave" ] && return 0
|
[ -z "$slave" -o "$slave" = "$slaveif" ] && return 0
|
||||||
master="$slave"
|
master="$slave"
|
||||||
else
|
else
|
||||||
[ -n "$slave" ] && append slaves "$slave"
|
[ -n "$slave" -o "$slave" = "$slaveif" ] && append slaves "$slave"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue