vnstat: avoid adding the same interface over and over when running uci-defaults again...
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 25 May 2013 12:04:48 +0000 (12:04 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 25 May 2013 12:04:48 +0000 (12:04 +0000)
SVN-Revision: 36716

net/vnstat/Makefile
net/vnstat/files/vnstat.defaults

index 577a314cfd416373cf0147f55c0ea432a4debcf2..93d11c93bffbb9b9d42c6a9150ea0ed6bfcd25f4 100644 (file)
@@ -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
index a2d353f3f676434650ad5f3d55b60ee2dde1d70c..e013b8e41f37053680ad3212c14d35df0bd8c30c 100644 (file)
@@ -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