diff options
author | Steven Barth <steven@midlink.org> | 2014-01-02 11:38:36 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-01-02 11:38:36 +0000 |
commit | 51b9513ec533b0147f54293196dd0fbbbe901ce3 (patch) | |
tree | 77acfd4a51f1923eeb478a287b070eb669f73d7f /package/network/ipv6/6relayd/files/6relayd.init | |
parent | b77e0ece626f7bc5def8c627fd822c8875ac6fa0 (diff) | |
download | master-187ad058-51b9513ec533b0147f54293196dd0fbbbe901ce3.tar.gz master-187ad058-51b9513ec533b0147f54293196dd0fbbbe901ce3.tar.bz2 master-187ad058-51b9513ec533b0147f54293196dd0fbbbe901ce3.zip |
6relayd: try to workaround race condition at startup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39184 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/6relayd/files/6relayd.init')
-rw-r--r-- | package/network/ipv6/6relayd/files/6relayd.init | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/package/network/ipv6/6relayd/files/6relayd.init b/package/network/ipv6/6relayd/files/6relayd.init index 89b8610b49..68816b765f 100644 --- a/package/network/ipv6/6relayd/files/6relayd.init +++ b/package/network/ipv6/6relayd/files/6relayd.init @@ -34,7 +34,7 @@ start_6relayd() { local master masterif config_get masterif "$cfg" master network_get_device master "$masterif" - [ -z "$master" ] && master="." + [ -z "$master" -o "$master" = "$masterif" ] && master="." # Detect slave interfaces local slaves="" @@ -45,10 +45,10 @@ start_6relayd() { network_get_device slave "$slaveif" # Compatibility with old config format if [ "$mode" = "relay" -a "$master" = "." ]; then - [ -z "$slave" ] && return 0 + [ -z "$slave" -o "$slave" = "$slaveif" ] && return 0 master="$slave" else - [ -n "$slave" ] && append slaves "$slave" + [ -n "$slave" -o "$slave" = "$slaveif" ] && append slaves "$slave" fi done |