Ob Noxious
2016-10-11 05:41:29 UTC
Hi,
Just a small issue I've faced. I made a typo on the "interfaces" file, like
this :
bar ${IF_BAR} nets=(${NET_BAR}),nosmurfs,rpfilter,bridge
dmz ${IF_F00} nets=(${NET_FOO}),nosmurfs,rpfilter,bridge
notice: ${IF_FOO} is misspelled with 00 (zeros) instead of letter "O" which
leads to an empty entry.
"shorewall ck" didn't complain.
"shorewall reload" failed with a shell syntax error complaining about
unbalanced parenthesis. It was a "case ... esac" statement with the
following content :
case $1 in
lo)
progress_message3 "..."
eth0|dmz|nets=(1.2.3.0/24),nosmurfs,rpfilter,bridge)
....
esac
We see why the shell would complain :-) I finally figured out the (stupid)
typo.
I report it in case you'd want to add further checks to this (and/or
others) to avoid this kind of situations where the "check" command gets
fooled and the error passes unnoticed.
Note to self: "interfaces" is the last config file using the "legacy"
columned notation and I guess it's time to convert it to the new (and way
better IMHO) syntax :-)
Just a small issue I've faced. I made a typo on the "interfaces" file, like
this :
bar ${IF_BAR} nets=(${NET_BAR}),nosmurfs,rpfilter,bridge
dmz ${IF_F00} nets=(${NET_FOO}),nosmurfs,rpfilter,bridge
notice: ${IF_FOO} is misspelled with 00 (zeros) instead of letter "O" which
leads to an empty entry.
"shorewall ck" didn't complain.
"shorewall reload" failed with a shell syntax error complaining about
unbalanced parenthesis. It was a "case ... esac" statement with the
following content :
case $1 in
lo)
progress_message3 "..."
eth0|dmz|nets=(1.2.3.0/24),nosmurfs,rpfilter,bridge)
....
esac
We see why the shell would complain :-) I finally figured out the (stupid)
typo.
I report it in case you'd want to add further checks to this (and/or
others) to avoid this kind of situations where the "check" command gets
fooled and the error passes unnoticed.
Note to self: "interfaces" is the last config file using the "legacy"
columned notation and I guess it's time to convert it to the new (and way
better IMHO) syntax :-)
--
ObNox
ObNox