Make saved firewall contents reproducible

Clean up iptables-save output to eliminate things that change per-run:
- Remove timestamp from comments
- Always write out counters as 0
This commit is contained in:
Philip Whineray 2017-01-15 09:21:26 +00:00
parent b0c715361f
commit 858264a8a2

@ -10103,6 +10103,9 @@ fixed_save() {
${CAT_CMD} ${tmp} |\
${SED_CMD} \
-e "/#/s/ on .*/ on time removed by FireHOL/" \
-e "s/^\[[0-9][0-9]*:[[0-9][0-9]*\]/[0:0]/" \
-e "s/\[[0-9][0-9]*:[[0-9][0-9]*\]$/[0:0]/" \
-e "s/--uid-owner !/! --uid-owner /g" \
-e "s/--gid-owner !/! --gid-owner /g"
err=$?