From 751c0dc4034db175a11acc0a566e1a85707abe23 Mon Sep 17 00:00:00 2001 From: Pawel Krawczyk Date: Mon, 1 Dec 2014 12:35:04 +0000 Subject: [PATCH] attempt to create the original set to ensure it exists before swap operation otherwise it will crash on the very first run on new systems --- blacklist.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/blacklist.sh b/blacklist.sh index 88823b8..f6185b2 100644 --- a/blacklist.sh +++ b/blacklist.sh @@ -57,6 +57,7 @@ for url in $urls; do hash_size=$(expr $new_list_size / 2) # start writing new set file + echo "create ${set_name} hash:net family inet" >>"${new_set_file}" echo "create ${tmp_set_name} hash:net family inet hashsize ${hash_size} maxelem ${new_list_size}" >>"${new_set_file}" # convert list of IPs to ipset statements