projects
/
firewall-squeep
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
476da89
)
uniq cidrs
author
Justin Wind
<justin.wind+git@gmail.com>
Thu, 20 Apr 2017 16:59:48 +0000
(09:59 -0700)
committer
Justin Wind
<justin.wind+git@gmail.com>
Thu, 20 Apr 2017 16:59:48 +0000
(09:59 -0700)
common.sh
patch
|
blob
|
history
diff --git
a/common.sh
b/common.sh
index c4da5fdfa43c8e41ed6e5abf9c9cdc54a665c19e..5c2ed1a56e052dc5b53a08e20dfeb4e4099e49d0 100644
(file)
--- a/
common.sh
+++ b/
common.sh
@@
-92,7
+92,7
@@
function ipset_restore_from_cidr(){
# extract existing set configuration to create temporary set
(set -o pipefail; $IPSET save "${set_name}${v}" 2>/dev/null | grep -m 1 '^create ' | sed "s/\(create ${set_name}${v}\)/\1-tmp/") || continue
# populate with new data
# extract existing set configuration to create temporary set
(set -o pipefail; $IPSET save "${set_name}${v}" 2>/dev/null | grep -m 1 '^create ' | sed "s/\(create ${set_name}${v}\)/\1-tmp/") || continue
# populate with new data
- decommentcat "${set_name}.cidr" "${set_name}.cidr.$(hostname -s)" 2>/dev/null | sed -n 's/\(.*'"${vmatch}"'.*\)/add '"${set_name}${v}-tmp"' \1/p'
+ decommentcat "${set_name}.cidr" "${set_name}.cidr.$(hostname -s)" 2>/dev/null | sed -n 's/\(.*'"${vmatch}"'.*\)/add '"${set_name}${v}-tmp"' \1/p'
| sort -n | uniq
done
}
done
}