Add a few more comments

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4125 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-06-16 22:40:36 +00:00
parent 2cee4cb596
commit 2f466f79f1

View File

@ -193,7 +193,12 @@ validate_restorefile() # $* = label
get_config() { get_config() {
if [ -z "$EXPORT" -a "$(whoami)" = root ]; then if [ -z "$EXPORT" -a "$(whoami)" = root ]; then
#
# This block is avoided for compile for export and when the user isn't root
#
# We don't export CONFIG_PATH so that CONFIG_PATH will be picked up fresh by the compiler
# from /usr/share/shorewall/configpath.
#
export CONFIG_PATH export CONFIG_PATH
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages [ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
@ -202,7 +207,7 @@ get_config() {
echo "LOGFILE ($LOGFILE) does not exist!" >&2 echo "LOGFILE ($LOGFILE) does not exist!" >&2
exit 2 exit 2
fi fi
if [ -n "$IPTABLES" ]; then if [ -n "$IPTABLES" ]; then
if [ ! -e "$IPTABLES" ]; then if [ ! -e "$IPTABLES" ]; then
echo " ERROR: The program specified in IPTABLES does not exist or is not executable" >&2 echo " ERROR: The program specified in IPTABLES does not exist or is not executable" >&2
@ -217,7 +222,7 @@ get_config() {
fi fi
export IPTABLES export IPTABLES
# #
# See if we have a real version of "tail" -- use separate redirection so # See if we have a real version of "tail" -- use separate redirection so
# that ash (aka /bin/sh on LRP) doesn't crap # that ash (aka /bin/sh on LRP) doesn't crap
@ -227,13 +232,15 @@ get_config() {
else else
realtail="" realtail=""
fi fi
#
# Compile by non-root needs no restore file
#
[ -n "$RESTOREFILE" ] || RESTOREFILE=restore [ -n "$RESTOREFILE" ] || RESTOREFILE=restore
validate_restorefile RESTOREFILE validate_restorefile RESTOREFILE
export RESTOREFILE export RESTOREFILE
case $STARTUP_ENABLED in case $STARTUP_ENABLED in
No|no|NO) No|no|NO)
echo " WARNING: Shorewall startup is disabled. To enable startup, set STARTUP_ENABLED=Yes in ${CONFDIR}/shorewall.conf" >&2 echo " WARNING: Shorewall startup is disabled. To enable startup, set STARTUP_ENABLED=Yes in ${CONFDIR}/shorewall.conf" >&2
@ -248,20 +255,20 @@ get_config() {
fi fi
;; ;;
esac esac
case ${TC_ENABLED:=Internal} in case ${TC_ENABLED:=Internal} in
No|NO|no) No|NO|no)
TC_ENABLED= TC_ENABLED=
;; ;;
esac esac
fi [ -n "LOGFORMAT" ] && LOGFORMAT="${LOGFORMAT%%%*}"
[ -n "LOGFORMAT" ] && LOGFORMAT="${LOGFORMAT%%%*}"
[ -n "$LOGFORMAT" ] || LOGFORMAT="Shorewall:" [ -n "$LOGFORMAT" ] || LOGFORMAT="Shorewall:"
export LOGFORMAT export LOGFORMAT
fi
if [ -n "$SHOREWALL_SHELL" ]; then if [ -n "$SHOREWALL_SHELL" ]; then
if [ ! -e "$SHOREWALL_SHELL" ]; then if [ ! -e "$SHOREWALL_SHELL" ]; then