Begin minor cleanup work for 1.0

master
bbruns 2011-10-28 21:41:09 +00:00
parent afa56a8cef
commit 4df28dc910
2 changed files with 14 additions and 6 deletions

View File

@ -4,6 +4,7 @@
we're not really going to need to track connections forwarding through the system. we're not really going to need to track connections forwarding through the system.
I can probably be proven wrong if you don't use NAT but use the script for stateful I can probably be proven wrong if you don't use NAT but use the script for stateful
firewalling with non-RFC1918 IPs.... firewalling with non-RFC1918 IPs....
- Cleanup work on code for v1.0
0.9.13 - Brielle Bruns <bruns@2mbit.com> 0.9.13 - Brielle Bruns <bruns@2mbit.com>
- Fix location of ipv6 fi statement, moved to end of ipv6 rules - Fix location of ipv6 fi statement, moved to end of ipv6 rules

View File

@ -46,8 +46,12 @@ if [ ! -r $BASEDIR/include/static ] || [ ! -r $BASEDIR/include/functions ]; then
exit 1 exit 1
fi fi
. $BASEDIR/include/static if [ -r $BASEDIR/include/static ]; then
. $BASEDIR/include/static
else
echo -e "${RED}Error: Can not load static variables file. There is no way to make this tool work without it."
exit 1
fi
if [ -r $BASEDIR/options ]; then if [ -r $BASEDIR/options ]; then
. $BASEDIR/options . $BASEDIR/options
@ -131,13 +135,13 @@ fi
iptables_rules_flush ipv4 iptables_rules_flush ipv4
if [ -s "$BASEDIR/include/ipv4_custom_flush" ]; then if [ -s "${BASEDIR}/include/ipv4_custom_flush" ]; then
display_c YELLOW "Loading custom flush rules..." display_c YELLOW "Loading custom flush rules..."
. "$BASEDIR/include/ipv4_custom_flush" . "${BASEDIR}/include/ipv4_custom_flush"
fi fi
if [ -x "$PRERUN" ]; then if [ -x "${PRERUN}" ]; then
$PRERUN ${PRERUN}
fi fi
if [ "$MODULES_LOAD" ]; then if [ "$MODULES_LOAD" ]; then
@ -164,6 +168,9 @@ else
C_STATE="--ctstate" C_STATE="--ctstate"
fi fi
# This function currently isn't implemented entirely or properly. It's mostly
# used for debugging purposes, and to see what iptables rules will be generated
# before running.
if [ "$GEN_CACHE" ]; then if [ "$GEN_CACHE" ]; then
case $GEN_CACHE in case $GEN_CACHE in
force) force)