[OpenWrt-Devel] [RFC PATCH 03/10] igmpproxy: generate config in /tmp/etc
Stijn Tintel
stijn at linux-ipv6.be
Mon Mar 28 13:51:42 EDT 2016
Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
package/network/services/igmpproxy/files/igmpproxy.init | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init
index d03f90f..7af69e3 100644
--- a/package/network/services/igmpproxy/files/igmpproxy.init
+++ b/package/network/services/igmpproxy/files/igmpproxy.init
@@ -4,7 +4,7 @@
START=99
USE_PROCD=1
PROG=/usr/sbin/igmpproxy
-CONFIGFILE=/var/etc/igmpproxy.conf
+CONFIGFILE=/tmp/etc/igmpproxy.conf
# igmpproxy supports both a debug mode and verbosity, which are very useful
# when something isn't working.
@@ -25,11 +25,11 @@ igmp_header() {
local quickleave
config_get_bool quickleave "$1" quickleave 0
- mkdir -p /var/etc
- rm -f /var/etc/igmpproxy.conf
- [ $quickleave -gt 0 ] && echo "quickleave" >> /var/etc/igmpproxy.conf
+ mkdir -p /tmp/etc
+ rm -f /tmp/etc/igmpproxy.conf
+ [ $quickleave -gt 0 ] && echo "quickleave" >> /tmp/etc/igmpproxy.conf
- [ -L /etc/igmpproxy.conf ] || ln -nsf /var/etc/igmpproxy.conf /etc/igmpproxy.conf
+ [ -L /etc/igmpproxy.conf ] || ln -nsf /tmp/etc/igmpproxy.conf /etc/igmpproxy.conf
}
igmp_add_phyint() {
@@ -55,12 +55,12 @@ igmp_add_phyint() {
[[ "$direction" = "upstream" ]] && has_upstream=1
- echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
+ echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /tmp/etc/igmpproxy.conf
if [ -n "$altnets" ]; then
local altnet
for altnet in $altnets; do
- echo -e "\taltnet $altnet" >> /var/etc/igmpproxy.conf
+ echo -e "\taltnet $altnet" >> /tmp/etc/igmpproxy.conf
done
fi
}
--
2.7.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list