From 8f6fcc0f045835728f4749ebfddeeffade58a438 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich <jow@openwrt.org> Date: Sat, 25 May 2013 12:04:48 +0000 Subject: [PATCH] vnstat: avoid adding the same interface over and over when running uci-defaults against already existing config SVN-Revision: 36716 --- net/vnstat/Makefile | 4 ++-- net/vnstat/files/vnstat.defaults | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile index 577a314cf..93d11c93b 100644 --- a/net/vnstat/Makefile +++ b/net/vnstat/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vnstat PKG_VERSION:=1.11 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://humdi.net/vnstat diff --git a/net/vnstat/files/vnstat.defaults b/net/vnstat/files/vnstat.defaults index a2d353f3f..e013b8e41 100644 --- a/net/vnstat/files/vnstat.defaults +++ b/net/vnstat/files/vnstat.defaults @@ -4,6 +4,7 @@ wan="$(uci -P/var/state get network.wan.ifname)" if [ -n "$wan" ]; then uci -q batch <<-EOF >/dev/null + del_list vnstat.@vnstat[-1].interface=$wan add_list vnstat.@vnstat[-1].interface=$wan commit vnstat EOF -- 2.30.2