mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-01 15:35:50 +02:00
Fix LOGFILE (again)
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6448 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
2e2f1e2977
commit
3572b6513a
@ -152,15 +152,17 @@ get_config() {
|
|||||||
#
|
#
|
||||||
export CONFIG_PATH
|
export CONFIG_PATH
|
||||||
|
|
||||||
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
|
if [ "$2" = Yes ]; then
|
||||||
|
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
|
||||||
|
|
||||||
if [ -n "$(syslog_circular_buffer)" ]; then
|
if [ -n "$(syslog_circular_buffer)" ]; then
|
||||||
LOGREAD="logread"
|
LOGREAD="logread"
|
||||||
elif [ -f $LOGFILE ]; then
|
elif [ -f $LOGFILE ]; then
|
||||||
LOGREAD="cat $LOGFILE"
|
LOGREAD="cat $LOGFILE"
|
||||||
else
|
else
|
||||||
echo "LOGFILE ($LOGFILE) does not exist!" >&2
|
echo "LOGFILE ($LOGFILE) does not exist!" >&2
|
||||||
exit 2
|
exit 2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$IPTABLES" ]; then
|
if [ -n "$IPTABLES" ]; then
|
||||||
@ -196,20 +198,22 @@ get_config() {
|
|||||||
|
|
||||||
export RESTOREFILE
|
export RESTOREFILE
|
||||||
|
|
||||||
case $STARTUP_ENABLED in
|
if [ "$2" = Yes ]; then
|
||||||
No|no|NO)
|
case $STARTUP_ENABLED in
|
||||||
echo " WARNING: Shorewall startup is disabled. To enable startup, set STARTUP_ENABLED=Yes in ${CONFDIR}/shorewall.conf" >&2
|
No|no|NO)
|
||||||
STARTUP_ENABLED=
|
echo " ERROR: Shorewall startup is disabled. To enable startup, set STARTUP_ENABLED=Yes in ${CONFDIR}/shorewall.conf" >&2
|
||||||
;;
|
|
||||||
Yes|yes|YES)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [ -n "$STARTUP_ENABLED" ]; then
|
|
||||||
echo " ERROR: Invalid Value for STARTUP_ENABLE: $STARTUP_ENABLED" >&2
|
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
;;
|
||||||
;;
|
Yes|yes|YES)
|
||||||
esac
|
;;
|
||||||
|
*)
|
||||||
|
if [ -n "$STARTUP_ENABLED" ]; then
|
||||||
|
echo " ERROR: Invalid Value for STARTUP_ENABLE: $STARTUP_ENABLED" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
case ${TC_ENABLED:=Internal} in
|
case ${TC_ENABLED:=Internal} in
|
||||||
No|NO|no)
|
No|NO|no)
|
||||||
@ -1461,7 +1465,7 @@ COMMAND=$1
|
|||||||
|
|
||||||
case "$COMMAND" in
|
case "$COMMAND" in
|
||||||
start)
|
start)
|
||||||
get_config
|
get_config No Yes
|
||||||
shift
|
shift
|
||||||
start_command $@
|
start_command $@
|
||||||
;;
|
;;
|
||||||
@ -1477,12 +1481,12 @@ case "$COMMAND" in
|
|||||||
compile_command $@
|
compile_command $@
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
get_config
|
get_config No Yes
|
||||||
shift
|
shift
|
||||||
restart_command $@
|
restart_command $@
|
||||||
;;
|
;;
|
||||||
refresh)
|
refresh)
|
||||||
get_config
|
get_config No Yes
|
||||||
shift
|
shift
|
||||||
refresh_command $@
|
refresh_command $@
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user