projects
/
openwrt
/
svn-archive
/
archive.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
vnstat: avoid adding the same interface over and over when running uci-defaults again...
[openwrt/svn-archive/archive.git]
/
net
/
vnstat
/
files
/
vnstat.defaults
1
#!/bin/sh
2
3
wan
=
"$(uci -P/var/state get network.wan.ifname)"
4
5
if
[
-n
"
$wan
"
];
then
6
uci
-q
batch
<<-EOF >/dev/null
7
del_list vnstat.@vnstat[-1].interface=
$wan
8
add_list vnstat.@vnstat[-1].interface=
$wan
9
commit vnstat
10
EOF
11
fi
12
13
exit
0