aboutsummaryrefslogtreecommitdiffstats
path: root/main/ipset/ipset.initd
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-03-21 12:08:46 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-03-21 12:08:46 +0200
commitb3052672fbb78403fc2104cdb1093abe9ed80b0c (patch)
treeda44a0a75ad05d0a15c6195c902368de5875e6d0 /main/ipset/ipset.initd
parent727d3b879fa8593da80813e43fbd57e08fb2bc32 (diff)
downloadaports-b3052672fbb78403fc2104cdb1093abe9ed80b0c.tar.bz2
aports-b3052672fbb78403fc2104cdb1093abe9ed80b0c.tar.xz
main/ipset: fix variable scope
Diffstat (limited to 'main/ipset/ipset.initd')
-rw-r--r--main/ipset/ipset.initd20
1 files changed, 9 insertions, 11 deletions
diff --git a/main/ipset/ipset.initd b/main/ipset/ipset.initd
index 2678c007e8..649b310ac5 100644
--- a/main/ipset/ipset.initd
+++ b/main/ipset/ipset.initd
@@ -85,17 +85,15 @@ save() {
reload() {
ebegin "Loading firewall IP sets"
- (
- local swap=
- for name in $(set_files); do
- local new=$name
- if set_exists $name; then
- new=_init_$name
- swap="$swap $name"
- fi
- echo create $new $(set_file $name | head -n 1)
- done
- ) | ipset restore
+ local swap=
+ for name in $(set_files); do
+ local new=$name
+ if set_exists $name; then
+ new=_init_$name
+ swap="$swap $name"
+ fi
+ echo create $new $(set_file $name | head -n 1)
+ done | ipset restore
(
for name in $(set_files); do