|
|
|
@ -257,7 +257,13 @@ load() {
|
|
|
|
|
CLEAN_FILES="${CLEAN_FILES} ${mangled}"
|
|
|
|
|
chmod 600 "${mangled}"
|
|
|
|
|
|
|
|
|
|
awk '/^(add|create) ('"${conflicts}"')/ { printf "%s ",$1; system("echo '${salt}'" $2 " | md5sum | head -c31"); $1=""; $2=""; print; next} {print}' "${merged}" > "${mangled}"
|
|
|
|
|
cat "${merged}" > "${mangled}"
|
|
|
|
|
IFS='|'
|
|
|
|
|
for set in ${conflicts}; do
|
|
|
|
|
new_name=$(echo "${salt}${set}" | md5sum | head -c31)
|
|
|
|
|
echo "s/^(add|create) $set /\1 $new_name /"
|
|
|
|
|
done | sed -i -r -f - "${mangled}"
|
|
|
|
|
unset IFS
|
|
|
|
|
if ! ipset_restore "${mangled}"; then
|
|
|
|
|
err "Failed to restore configured sets"
|
|
|
|
|
exit 1
|
|
|
|
|