mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-22 20:51:15 +01:00
Remove empty/useless ipsets tmp file in Shorewall-init
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
2ed11c7e15
commit
fb831e3128
@ -104,7 +104,9 @@ shorewall_stop () {
|
|||||||
if [ -n "$SAVE_IPSETS" ]; then
|
if [ -n "$SAVE_IPSETS" ]; then
|
||||||
mkdir -p $(dirname "$SAVE_IPSETS")
|
mkdir -p $(dirname "$SAVE_IPSETS")
|
||||||
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
if ipset -S > "${SAVE_IPSETS}.tmp"; then
|
||||||
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS"
|
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
|
||||||
|
else
|
||||||
|
rm -f "${SAVE_IPSETS}.tmp"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user