From patchwork Mon Mar 28 17:51:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 602528 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qYhPX2jkLz9t0s for ; Tue, 29 Mar 2016 04:54:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.b=jQCjnIE4; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A7F40B911E6; Mon, 28 Mar 2016 19:52:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Mon, 28 Mar 2016 19:52:08 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 245BBB911C8 for ; Mon, 28 Mar 2016 19:51:59 +0200 (CEST) X-policyd-weight: using cached result; rate: -6.1 Received: from mail.tintel.eu (mail.tintel.eu [62.213.201.86]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 28 Mar 2016 19:51:56 +0200 (CEST) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id D15A72A41FD for ; Mon, 28 Mar 2016 19:51:54 +0200 (CEST) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id WvGAyduLranr for ; Mon, 28 Mar 2016 19:51:54 +0200 (CEST) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 0642B2A41FE for ; Mon, 28 Mar 2016 19:51:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.tintel.eu 0642B2A41FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1459187514; bh=XkRw73aPy7ics8v9InshGfPPRKP1zG9NP/uP9Z2gHBo=; h=From:To:Subject:Date:Message-Id; b=jQCjnIE4qcbbg2xlUuqnkuacWqqsLP9NEobupguz7XYwMb6SG2HWeL6aviP9rDpts 01BY5jmzxG2YqMy1X/ZDVHJ+7fSEpf/myN7M7FfiB9pnzJUQr6E9MqWpwJ4BcR8PBh l0PU5v7FQUNQpXgPSu+u7yBDV+k6XTTABG1g/W+E= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id Czxw5GVUcyLc for ; Mon, 28 Mar 2016 19:51:53 +0200 (CEST) Received: from store.st-esk.be.tintel.eu (unknown [IPv6:2a02:1811:406:dc00:1e6f:65ff:fef8:7a3b]) by mail.tintel.eu (Postfix) with SMTP id A45EF2A41FD for ; Mon, 28 Mar 2016 19:51:52 +0200 (CEST) Received: by store.st-esk.be.tintel.eu (sSMTP sendmail emulation); Mon, 28 Mar 2016 19:51:53 +0200 From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Date: Mon, 28 Mar 2016 19:51:42 +0200 Message-Id: <1459187509-12124-4-git-send-email-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1459187509-12124-1-git-send-email-stijn@linux-ipv6.be> References: <1459187509-12124-1-git-send-email-stijn@linux-ipv6.be> Subject: [OpenWrt-Devel] [RFC PATCH 03/10] igmpproxy: generate config in /tmp/etc X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Stijn Tintel --- 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 }