vnstat: avoid adding the same interface over and over when running uci-defaults against already existing config

git-svn-id: svn://svn.openwrt.org/openwrt/packages@36716 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2013-05-25 12:04:48 +00:00
parent eb559e89c8
commit c04fbfede4
2 changed files with 3 additions and 2 deletions

View 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

View 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