projects
/
openwrt
/
staging
/
dedeckeh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
igmpproxy: do not start instance if no upstream interface is available
[openwrt/staging/dedeckeh.git]
/
package
/
network
/
services
/
igmpproxy
/
files
/
igmpproxy.init
diff --git
a/package/network/services/igmpproxy/files/igmpproxy.init
b/package/network/services/igmpproxy/files/igmpproxy.init
index 44f3f64c3ef3236b7603442b1dfd75af1c1ad2b0..dd2e430b516c006ec8367c444c606d534da36ab5 100644
(file)
--- a/
package/network/services/igmpproxy/files/igmpproxy.init
+++ b/
package/network/services/igmpproxy/files/igmpproxy.init
@@
-48,6
+48,8
@@
igmp_add_phyint() {
return;
}
return;
}
+ [[ "$direction" = "upstream" ]] && has_upstream=1
+
echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
if [ -n "$altnets" ]; then
echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
if [ -n "$altnets" ]; then
@@
-104,11
+106,14
@@
service_triggers() {
}
start_service() {
}
start_service() {
+ has_upstream=
config_load igmpproxy
config_load igmpproxy
- procd_open_instance
config_foreach igmp_header igmpproxy
config_foreach igmp_add_phyint phyint
config_foreach igmp_header igmpproxy
config_foreach igmp_add_phyint phyint
+ [ -n "$has_upstream" ] || return
+
+ procd_open_instance
procd_set_param command $PROG
[ -n "$OPTIONS" ] && procd_append_param $OPTIONS
procd_append_param command $CONFIGFILE
procd_set_param command $PROG
[ -n "$OPTIONS" ] && procd_append_param $OPTIONS
procd_append_param command $CONFIGFILE