diff --git a/Shorewall-lite/shorecap b/Shorewall-lite/shorecap
index 6fa446578..af46729ef 100755
--- a/Shorewall-lite/shorecap
+++ b/Shorewall-lite/shorecap
@@ -48,7 +48,7 @@
SHAREDIR=/usr/share/shorewall-lite
VARDIR=/var/lib/shorewall-lite
CONFDIR=/etc/shorewall-lite
-PRODUCT="Shorewall Lite"
+g_product="Shorewall Lite"
. /usr/share/shorewall-lite/lib.base
. /usr/share/shorewall-lite/configpath
diff --git a/Shorewall-lite/shorewall-lite b/Shorewall-lite/shorewall-lite
index 45e5f48de..e4e2e3f1e 100755
--- a/Shorewall-lite/shorewall-lite
+++ b/Shorewall-lite/shorewall-lite
@@ -522,7 +522,7 @@ MUTEX_TIMEOUT=
SHAREDIR=/usr/share/shorewall-lite
CONFDIR=/etc/shorewall-lite
-export PRODUCT="Shorewall Lite"
+g_product="Shorewall Lite"
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir ]
diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm
index 1ed58efb0..711745f89 100644
--- a/Shorewall/Perl/Shorewall/Compiler.pm
+++ b/Shorewall/Perl/Shorewall/Compiler.pm
@@ -167,24 +167,24 @@ sub generate_script_2() {
if ( $export ) {
emit ( 'SHAREDIR=/usr/share/shorewall-lite',
'CONFDIR=/etc/shorewall-lite',
- 'PRODUCT="Shorewall Lite"'
+ 'g_product="Shorewall Lite"'
);
} else {
emit ( 'SHAREDIR=/usr/share/shorewall',
'CONFDIR=/etc/shorewall',
- 'PRODUCT=\'Shorewall\'',
+ 'g_product=\'Shorewall\'',
);
}
} else {
if ( $export ) {
emit ( 'SHAREDIR=/usr/share/shorewall6-lite',
'CONFDIR=/etc/shorewall6-lite',
- 'PRODUCT="Shorewall6 Lite"'
+ 'g_product="Shorewall6 Lite"'
);
} else {
emit ( 'SHAREDIR=/usr/share/shorewall6',
'CONFDIR=/etc/shorewall6',
- 'PRODUCT=\'Shorewall6\'',
+ 'g_product=\'Shorewall6\'',
);
}
}
@@ -540,16 +540,16 @@ date > ${VARDIR}/restarted
case $COMMAND in
start)
- logger -p kern.info "$PRODUCT started"
+ logger -p kern.info "$g_product started"
;;
restart)
- logger -p kern.info "$PRODUCT restarted"
+ logger -p kern.info "$g_product restarted"
;;
refresh)
- logger -p kern.info "$PRODUCT refreshed"
+ logger -p kern.info "$g_product refreshed"
;;
restore)
- logger -p kern.info "$PRODUCT restored"
+ logger -p kern.info "$g_product restored"
;;
esac
EOF
diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm
index d7aeeb828..33699e419 100644
--- a/Shorewall/Perl/Shorewall/Rules.pm
+++ b/Shorewall/Perl/Shorewall/Rules.pm
@@ -2242,20 +2242,20 @@ EOF
case $COMMAND in
start)
- logger -p kern.err "ERROR:$PRODUCT start failed"
+ logger -p kern.err "ERROR:$g_product start failed"
;;
restart)
- logger -p kern.err "ERROR:$PRODUCT restart failed"
+ logger -p kern.err "ERROR:$g_product restart failed"
;;
refresh)
- logger -p kern.err "ERROR:$PRODUCT refresh failed"
+ logger -p kern.err "ERROR:$g_product refresh failed"
;;
esac
if [ "$RESTOREFILE" = NONE ]; then
COMMAND=clear
clear_firewall
- echo "$PRODUCT Cleared"
+ echo "$g_product Cleared"
kill $$
exit 2
@@ -2263,13 +2263,13 @@ EOF
g_restorepath=${VARDIR}/$RESTOREFILE
if [ -x $g_restorepath ]; then
- echo Restoring ${PRODUCT:=Shorewall}...
+ echo Restoring ${g_product:=Shorewall}...
RECOVERING=Yes
export RECOVERING
if $g_restorepath restore; then
- echo "$PRODUCT restored from $g_restorepath"
+ echo "$g_product restored from $g_restorepath"
set_state "Started"
else
set_state "Unknown"
@@ -2443,7 +2443,7 @@ EOF
emit '
set_state "Stopped"
- logger -p kern.info "$PRODUCT Stopped"
+ logger -p kern.info "$g_product Stopped"
case $COMMAND in
stop|clear)
diff --git a/Shorewall/Perl/prog.footer b/Shorewall/Perl/prog.footer
index a23f23db2..bd38e247d 100644
--- a/Shorewall/Perl/prog.footer
+++ b/Shorewall/Perl/prog.footer
@@ -115,10 +115,10 @@ case "$COMMAND" in
start)
[ $# -ne 1 ] && usage 2
if shorewall_is_started; then
- error_message "$PRODUCT is already Running"
+ error_message "$g_product is already Running"
status=0
else
- progress_message3 "Starting $PRODUCT...."
+ progress_message3 "Starting $g_product...."
detect_configuration
define_firewall
status=$?
@@ -128,7 +128,7 @@ case "$COMMAND" in
;;
stop)
[ $# -ne 1 ] && usage 2
- progress_message3 "Stopping $PRODUCT...."
+ progress_message3 "Stopping $g_product...."
detect_configuration
stop_firewall
status=0
@@ -137,7 +137,7 @@ case "$COMMAND" in
;;
reset)
if ! shorewall_is_started ; then
- error_message "$PRODUCT is not running"
+ error_message "$g_product is not running"
status=2
elif [ $# -eq 1 ]; then
$IPTABLES -Z
@@ -145,7 +145,7 @@ case "$COMMAND" in
$IPTABLES -t mangle -Z
date > ${VARDIR}/restarted
status=0
- progress_message3 "$PRODUCT Counters Reset"
+ progress_message3 "$g_product Counters Reset"
else
shift
status=0
@@ -167,10 +167,10 @@ case "$COMMAND" in
restart)
[ $# -ne 1 ] && usage 2
if shorewall_is_started; then
- progress_message3 "Restarting $PRODUCT...."
+ progress_message3 "Restarting $g_product...."
else
- error_message "$PRODUCT is not running"
- progress_message3 "Starting $PRODUCT...."
+ error_message "$g_product is not running"
+ progress_message3 "Starting $g_product...."
fi
detect_configuration
@@ -184,13 +184,13 @@ case "$COMMAND" in
refresh)
[ $# -ne 1 ] && usage 2
if shorewall_is_started; then
- progress_message3 "Refreshing $PRODUCT...."
+ progress_message3 "Refreshing $g_product...."
detect_configuration
define_firewall
status=$?
progress_message3 "done."
else
- echo "$PRODUCT is not running" >&2
+ echo "$g_product is not running" >&2
status=2
fi
;;
@@ -205,7 +205,7 @@ case "$COMMAND" in
;;
clear)
[ $# -ne 1 ] && usage 2
- progress_message3 "Clearing $PRODUCT...."
+ progress_message3 "Clearing $g_product...."
clear_firewall
status=0
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
@@ -213,13 +213,13 @@ case "$COMMAND" in
;;
status)
[ $# -ne 1 ] && usage 2
- echo "$PRODUCT-$SHORWEALL_VERSION Status at $(hostname) - $(date)"
+ echo "$g_product-$SHORWEALL_VERSION Status at $(hostname) - $(date)"
echo
if shorewall_is_started; then
- echo "$PRODUCT is running"
+ echo "$g_product is running"
status=0
else
- echo "$PRODUCT is stopped"
+ echo "$g_product is stopped"
status=4
fi
diff --git a/Shorewall/Perl/prog.footer6 b/Shorewall/Perl/prog.footer6
index b678d8466..95713e6ad 100644
--- a/Shorewall/Perl/prog.footer6
+++ b/Shorewall/Perl/prog.footer6
@@ -110,17 +110,17 @@ COMMAND="$1"
kernel=$(printf "%2d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
if [ $kernel -lt 20624 ]; then
- error_message "ERROR: $PRODUCT requires Linux kernel 2.6.24 or later"
+ error_message "ERROR: $g_product requires Linux kernel 2.6.24 or later"
status=2
else
case "$COMMAND" in
start)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
- error_message "$PRODUCT is already Running"
+ error_message "$g_product is already Running"
status=0
else
- progress_message3 "Starting $PRODUCT...."
+ progress_message3 "Starting $g_product...."
detect_configuration
define_firewall
status=$?
@@ -130,7 +130,7 @@ else
;;
stop)
[ $# -ne 1 ] && usage 2
- progress_message3 "Stopping $PRODUCT...."
+ progress_message3 "Stopping $g_product...."
detect_configuration
stop_firewall
status=0
@@ -139,14 +139,14 @@ else
;;
reset)
if ! shorewall6_is_started ; then
- error_message "$PRODUCT is not running"
+ error_message "$g_product is not running"
status=2
elif [ $# -eq 1 ]; then
$IP6TABLES -Z
$IP6TABLES -t mangle -Z
date > ${VARDIR}/restarted
status=0
- progress_message3 "$PRODUCT Counters Reset"
+ progress_message3 "$g_product Counters Reset"
else
shift
status=0
@@ -168,10 +168,10 @@ else
restart)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
- progress_message3 "Restarting $PRODUCT...."
+ progress_message3 "Restarting $g_product...."
else
- error_message "$PRODUCT is not running"
- progress_message3 "Starting $PRODUCT...."
+ error_message "$g_product is not running"
+ progress_message3 "Starting $g_product...."
fi
detect_configuration
@@ -185,13 +185,13 @@ else
refresh)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
- progress_message3 "Refreshing $PRODUCT...."
+ progress_message3 "Refreshing $g_product...."
detect_configuration
define_firewall
status=$?
progress_message3 "done."
else
- echo "$PRODUCT is not running" >&2
+ echo "$g_product is not running" >&2
status=2
fi
;;
@@ -206,7 +206,7 @@ else
;;
clear)
[ $# -ne 1 ] && usage 2
- progress_message3 "Clearing $PRODUCT...."
+ progress_message3 "Clearing $g_product...."
clear_firewall
status=0
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
@@ -214,13 +214,13 @@ else
;;
status)
[ $# -ne 1 ] && usage 2
- echo "$PRODUCT-$SHOREWALL_VERSION Status at $(hostname) - $(date)"
+ echo "$g_product-$SHOREWALL_VERSION Status at $(hostname) - $(date)"
echo
if shorewall6_is_started; then
- echo "$PRODUCT is running"
+ echo "$g_product is running"
status=0
else
- echo "$PRODUCT is stopped"
+ echo "$g_product is stopped"
status=4
fi
diff --git a/Shorewall/Perl/prog.header b/Shorewall/Perl/prog.header
index 96e5b6b35..c39467d86 100644
--- a/Shorewall/Perl/prog.header
+++ b/Shorewall/Perl/prog.header
@@ -1114,7 +1114,7 @@ clear_firewall() {
set_state "Cleared"
- logger -p kern.info "$PRODUCT Cleared"
+ logger -p kern.info "$g_product Cleared"
}
#
@@ -1142,13 +1142,13 @@ startup_error() # $* = Error Message
echo " ERROR: $@: Firewall state not changed" >&2
case $COMMAND in
start)
- logger -p kern.err "ERROR:$PRODUCT start failed:Firewall state not changed"
+ logger -p kern.err "ERROR:$g_product start failed:Firewall state not changed"
;;
restart)
- logger -p kern.err "ERROR:$PRODUCT restart failed:Firewall state not changed"
+ logger -p kern.err "ERROR:$g_product restart failed:Firewall state not changed"
;;
restore)
- logger -p kern.err "ERROR:$PRODUCT restore failed:Firewall state not changed"
+ logger -p kern.err "ERROR:$g_product restore failed:Firewall state not changed"
;;
esac
@@ -1157,13 +1157,13 @@ startup_error() # $* = Error Message
case $COMMAND in
start)
- echo "${timestamp} ERROR:$PRODUCT start failed:Firewall state not changed" >> $STARTUP_LOG
+ echo "${timestamp} ERROR:$g_product start failed:Firewall state not changed" >> $STARTUP_LOG
;;
restart)
- echo "${timestamp} ERROR:$PRODUCT restart failed:Firewall state not changed" >> $STARTUP_LOG
+ echo "${timestamp} ERROR:$g_product restart failed:Firewall state not changed" >> $STARTUP_LOG
;;
restore)
- echo "${timestamp} ERROR:$PRODUCT restore failed:Firewall state not changed" >> $STARTUP_LOG
+ echo "${timestamp} ERROR:$g_product restore failed:Firewall state not changed" >> $STARTUP_LOG
;;
esac
fi
diff --git a/Shorewall/Perl/prog.header6 b/Shorewall/Perl/prog.header6
index a5260d079..c44743072 100644
--- a/Shorewall/Perl/prog.header6
+++ b/Shorewall/Perl/prog.header6
@@ -965,7 +965,7 @@ clear_firewall() {
set_state "Cleared"
- logger -p kern.info "$PRODUCT Cleared"
+ logger -p kern.info "$g_product Cleared"
}
#
@@ -993,13 +993,13 @@ startup_error() # $* = Error Message
echo " ERROR: $@: Firewall state not changed" >&2
case $COMMAND in
start)
- logger -p kern.err "ERROR:$PRODUCT start failed:Firewall state not changed"
+ logger -p kern.err "ERROR:$g_product start failed:Firewall state not changed"
;;
restart)
- logger -p kern.err "ERROR:$PRODUCT restart failed:Firewall state not changed"
+ logger -p kern.err "ERROR:$g_product restart failed:Firewall state not changed"
;;
restore)
- logger -p kern.err "ERROR:$PRODUCT restore failed:Firewall state not changed"
+ logger -p kern.err "ERROR:$g_product restore failed:Firewall state not changed"
;;
esac
@@ -1008,13 +1008,13 @@ startup_error() # $* = Error Message
case $COMMAND in
start)
- echo "${timestamp} ERROR:$PRODUCT start failed:Firewall state not changed" >> $STARTUP_LOG
+ echo "${timestamp} ERROR:$g_product start failed:Firewall state not changed" >> $STARTUP_LOG
;;
restart)
- echo "${timestamp} ERROR:$PRODUCT restart failed:Firewall state not changed" >> $STARTUP_LOG
+ echo "${timestamp} ERROR:$g_product restart failed:Firewall state not changed" >> $STARTUP_LOG
;;
restore)
- echo "${timestamp} ERROR:$PRODUCT restore failed:Firewall state not changed" >> $STARTUP_LOG
+ echo "${timestamp} ERROR:$g_product restore failed:Firewall state not changed" >> $STARTUP_LOG
;;
esac
fi
diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli
index b08a35054..b73d83fac 100644
--- a/Shorewall/lib.cli
+++ b/Shorewall/lib.cli
@@ -344,7 +344,7 @@ save_config() {
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
if [ -f $g_restorepath -a ! -x $g_restorepath ]; then
- echo " ERROR: $g_restorepath exists and is not a saved $PRODUCT configuration" >&2
+ echo " ERROR: $g_restorepath exists and is not a saved $g_product configuration" >&2
else
case $RESTOREFILE in
capabilities|chains|default_route|firewall|firewall.conf|nat|proxyarp|restarted|rt_tables|save|state|undo_routing|zones)
@@ -514,34 +514,34 @@ show_command() {
[ $# -gt 1 ] && usage 1
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
- echo "$PRODUCT $SHOREWALL_VERSION Connections ($count out of $max) at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Connections ($count out of $max) at $g_hostname - $(date)"
echo
[ -f /proc/net/ip_conntrack ] && cat /proc/net/ip_conntrack || grep -v '^ipv6' /proc/net/nf_conntrack
;;
nat)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION NAT Table at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION NAT Table at $g_hostname - $(date)"
echo
show_reset
$IPTABLES -t nat -L $g_ipt_options
;;
raw)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION RAW Table at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION RAW Table at $g_hostname - $(date)"
echo
show_reset
$IPTABLES -t raw -L $g_ipt_options
;;
tos|mangle)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Mangle Table at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Mangle Table at $g_hostname - $(date)"
echo
show_reset
$IPTABLES -t mangle -L $g_ipt_options
;;
log)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Log ($LOGFILE) at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Log ($LOGFILE) at $g_hostname - $(date)"
echo
show_reset
host=$(echo $g_hostname | sed 's/\..*$//')
@@ -549,21 +549,21 @@ show_command() {
;;
tc)
[ $# -gt 2 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Traffic Control at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Traffic Control at $g_hostname - $(date)"
echo
shift
show_tc $1
;;
classifiers|filters)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Classifiers at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Classifiers at $g_hostname - $(date)"
echo
show_classifiers
;;
zones)
[ $# -gt 1 ] && usage 1
if [ -f ${VARDIR}/zones ]; then
- echo "$PRODUCT $SHOREWALL_VERSION Zones at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Zones at $g_hostname - $(date)"
echo
while read zone type hosts; do
echo "$zone ($type)"
@@ -596,13 +596,13 @@ show_command() {
;;
ip)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION IP at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION IP at $g_hostname - $(date)"
echo
ip -4 addr list
;;
routing)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Routing at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Routing at $g_hostname - $(date)"
echo
show_routing
;;
@@ -613,7 +613,7 @@ show_command() {
;;
chain)
shift
- echo "$PRODUCT $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || [ $# -gt 0 ] && echo "Chain " || echo $table Table)$* at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || [ $# -gt 0 ] && echo "Chain " || echo $table Table)$* at $g_hostname - $(date)"
echo
show_reset
if [ $# -gt 0 ]; then
@@ -630,12 +630,12 @@ show_command() {
;;
policies)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Policies at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Policies at $g_hostname - $(date)"
echo
[ -f ${VARDIR}/policies ] && cat ${VARDIR}/policies;
;;
*)
- if [ "$PRODUCT" = Shorewall ]; then
+ if [ "$g_product" = Shorewall ]; then
case $1 in
actions)
[ $# -gt 1 ] && usage 1
@@ -715,7 +715,7 @@ show_command() {
fi
done
- echo "$PRODUCT $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || echo "Chain ")$* at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || echo "Chain ")$* at $g_hostname - $(date)"
echo
show_reset
for chain in $*; do
@@ -723,7 +723,7 @@ show_command() {
echo
done
else
- echo "$PRODUCT $SHOREWALL_VERSION $table Table at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION $table Table at $g_hostname - $(date)"
echo
show_reset
$IPTABLES -t $table -L $g_ipt_options
@@ -783,7 +783,7 @@ dump_command() {
[ -n "$g_debugging" ] && set -x
[ $# -eq 0 ] || usage 1
clear_term
- echo "$PRODUCT $SHOREWALL_VERSION Dump at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Dump at $g_hostname - $(date)"
echo
show_reset
@@ -924,7 +924,7 @@ restore_command() {
if [ -x $g_restorepath ]; then
progress_message3 "Restoring Shorewall..."
- $SHOREWALL_SHELL $g_restorepath restore && progress_message3 "$PRODUCT restored from ${VARDIR}/$RESTOREFILE"
+ $SHOREWALL_SHELL $g_restorepath restore && progress_message3 "$g_product restored from ${VARDIR}/$RESTOREFILE"
[ -n "$nolock" ] || mutex_off
else
@@ -1020,7 +1020,7 @@ block() # $1 = command, $2 = Finished, $3 - $n addresses
finished=$2
if ! chain_exists dynamic; then
- echo "Dynamic blacklisting is not enabled in the current $PRODUCT configuration" >&2
+ echo "Dynamic blacklisting is not enabled in the current $g_product configuration" >&2
[ -n "$nolock" ] || mutex_off
exit 2
fi
@@ -1276,7 +1276,7 @@ hits_command() {
[ $# -eq 0 ] || usage 1
clear_term
- echo "$PRODUCT $SHOREWALL_VERSION Hits at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Hits at $g_hostname - $(date)"
echo
timeout=30
@@ -1332,7 +1332,7 @@ allow_command() {
[ $# -eq 1 ] && usage 1
if shorewall_is_started ; then
if ! chain_exists dynamic; then
- echo "Dynamic blacklisting is not enabled in the current $PRODUCT configuration" >&2
+ echo "Dynamic blacklisting is not enabled in the current $g_product configuration" >&2
exit 2
fi
@@ -1366,7 +1366,7 @@ allow_command() {
done
[ -n "$nolock" ] || mutex_off
else
- error_message "ERROR: $PRODUCT is not started"
+ error_message "ERROR: $g_product is not started"
exit 2
fi
}
diff --git a/Shorewall/shorewall b/Shorewall/shorewall
index e0c597917..09c7a9a35 100755
--- a/Shorewall/shorewall
+++ b/Shorewall/shorewall
@@ -1583,7 +1583,7 @@ MUTEX_TIMEOUT=
SHAREDIR=/usr/share/shorewall
CONFDIR=/etc/shorewall
-export PRODUCT="Shorewall"
+g_product="Shorewall"
export RECOVERING=
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir
@@ -1757,7 +1757,7 @@ case "$COMMAND" in
[ $# -eq 1 ] && usage 1
if shorewall_is_started ; then
if ! chain_exists dynamic; then
- echo "Dynamic blacklisting is not supported in the current $PRODUCT configuration"
+ echo "Dynamic blacklisting is not supported in the current $g_product configuration"
exit 2
fi
@@ -1774,7 +1774,7 @@ case "$COMMAND" in
[ $# -eq 1 ] && usage 1
if shorewall_is_started ; then
if ! chain_exists dynamic; then
- echo "Dynamic blacklisting is not supported in the current $PRODUCT configuration"
+ echo "Dynamic blacklisting is not supported in the current $g_product configuration"
exit 2
fi
diff --git a/Shorewall6-lite/shorecap b/Shorewall6-lite/shorecap
index 1d9048a8a..b15b42325 100755
--- a/Shorewall6-lite/shorecap
+++ b/Shorewall6-lite/shorecap
@@ -48,7 +48,7 @@
SHAREDIR=/usr/share/shorewall6-lite
VARDIR=/var/lib/shorewall6-lite
CONFDIR=/etc/shorewall6-lite
-PRODUCT="Shorewall Lite"
+g_product="Shorewall Lite"
. /usr/share/shorewall6-lite/lib.base
. /usr/share/shorewall6-lite/configpath
diff --git a/Shorewall6-lite/shorewall6-lite b/Shorewall6-lite/shorewall6-lite
index ad3f04410..dac7e4748 100755
--- a/Shorewall6-lite/shorewall6-lite
+++ b/Shorewall6-lite/shorewall6-lite
@@ -507,7 +507,7 @@ MUTEX_TIMEOUT=
SHAREDIR=/usr/share/shorewall6-lite
CONFDIR=/etc/shorewall6-lite
-export PRODUCT="Shorewall6 Lite"
+g_product="Shorewall6 Lite"
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir ]
diff --git a/Shorewall6/lib.cli b/Shorewall6/lib.cli
index 148da519f..ea6998153 100644
--- a/Shorewall6/lib.cli
+++ b/Shorewall6/lib.cli
@@ -285,7 +285,7 @@ save_config() {
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
if [ -f $g_restorepath -a ! -x $g_restorepath ]; then
- echo " ERROR: $g_restorepath exists and is not a saved $PRODUCT configuration" >&2
+ echo " ERROR: $g_restorepath exists and is not a saved $g_product configuration" >&2
else
case $RESTOREFILE in
capabilities|chains|default_route|firewall|firewall.conf|nat|proxyarp|restarted|rt_tables|save|state|undo_routing|zones)
@@ -427,27 +427,27 @@ show_command() {
[ $# -gt 1 ] && usage 1
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
- echo "$PRODUCT $SHOREWALL_VERSION Connections ($count of $max) at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Connections ($count of $max) at $g_hostname - $(date)"
echo
grep '^ipv6' /proc/net/nf_conntrack
;;
tos|mangle)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Mangle Table at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Mangle Table at $g_hostname - $(date)"
echo
show_reset
$IP6TABLES -t mangle -L $g_ipt_options
;;
raw)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION raw Table at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION raw Table at $g_hostname - $(date)"
echo
show_reset
$IP6TABLES -t raw -L $g_ipt_options
;;
log)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Log ($LOGFILE) at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Log ($LOGFILE) at $g_hostname - $(date)"
echo
show_reset
host=$(echo $g_hostname | sed 's/\..*$//')
@@ -455,20 +455,20 @@ show_command() {
;;
tc)
[ $# -gt 2 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Traffic Control at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Traffic Control at $g_hostname - $(date)"
echo
show_tc
;;
classifiers|filters)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Classifiers at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Classifiers at $g_hostname - $(date)"
echo
show_classifiers
;;
zones)
[ $# -gt 1 ] && usage 1
if [ -f ${VARDIR}/zones ]; then
- echo "$PRODUCT $SHOREWALL_VERSION Zones at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Zones at $g_hostname - $(date)"
echo
while read zone type hosts; do
echo "$zone ($type)"
@@ -501,13 +501,13 @@ show_command() {
;;
ip)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION IP at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION IP at $g_hostname - $(date)"
echo
ip -6 addr list
;;
routing)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Routing at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Routing at $g_hostname - $(date)"
echo
show_routing
;;
@@ -518,7 +518,7 @@ show_command() {
;;
chain)
shift
- echo "$PRODUCT $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || [ $# -gt 0 ] && echo "Chain " || echo $table Table)$* at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || [ $# -gt 0 ] && echo "Chain " || echo $table Table)$* at $g_hostname - $(date)"
echo
show_reset
if [ $# -gt 0 ]; then
@@ -534,12 +534,12 @@ show_command() {
;;
policies)
[ $# -gt 1 ] && usage 1
- echo "$PRODUCT $SHOREWALL_VERSION Policies at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Policies at $g_hostname - $(date)"
echo
[ -f ${VARDIR}/policies ] && cat ${VARDIR}/policies;
;;
*)
- if [ "$PRODUCT" = Shorewall6 ]; then
+ if [ "$g_product" = Shorewall6 ]; then
case $1 in
actions)
[ $# -gt 1 ] && usage 1
@@ -592,14 +592,14 @@ show_command() {
fi
done
- echo "$PRODUCT $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || echo "Chain ")$* at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION $([ $# -gt 1 ] && echo "Chains " || echo "Chain ")$* at $g_hostname - $(date)"
echo
show_reset
for chain in $*; do
$IP6TABLES -t $table -L $chain $g_ipt_options
done
else
- echo "$PRODUCT $SHOREWALL_VERSION $table Table at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION $table Table at $g_hostname - $(date)"
echo
show_reset
$IP6TABLES -t $table -L $g_ipt_options
@@ -659,7 +659,7 @@ dump_command() {
[ -n "$g_debugging" ] && set -x
[ $# -eq 0 ] || usage 1
clear_term
- echo "$PRODUCT $SHOREWALL_VERSION Dump at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Dump at $g_hostname - $(date)"
echo
if [ -f /usr/share/shorewall/version ]; then
@@ -807,7 +807,7 @@ restore_command() {
progress_message3 "Restoring Shorewall6..."
- $SHOREWALL_SHELL $g_restorepath restore && progress_message3 "$PRODUCT restored from ${VARDIR}/$RESTOREFILE"
+ $SHOREWALL_SHELL $g_restorepath restore && progress_message3 "$g_product restored from ${VARDIR}/$RESTOREFILE"
[ -n "$nolock" ] || mutex_off
else
@@ -903,7 +903,7 @@ block() # $1 = command, $2 = Finished, $3 - $n addresses
finished=$2
if ! chain_exists dynamic; then
- echo "Dynamic blacklisting is not enabled in the current $PRODUCT configuration" >&2
+ echo "Dynamic blacklisting is not enabled in the current $g_product configuration" >&2
[ -n "$nolock" ] || mutex_off
exit 2
fi
@@ -974,7 +974,7 @@ hits_command() {
[ $# -eq 0 ] || usage 1
clear_term
- echo "$PRODUCT $SHOREWALL_VERSION Hits at $g_hostname - $(date)"
+ echo "$g_product $SHOREWALL_VERSION Hits at $g_hostname - $(date)"
echo
timeout=30
@@ -1030,7 +1030,7 @@ allow_command() {
[ $# -eq 1 ] && usage 1
if shorewall6_is_started ; then
if ! chain_exists dynamic; then
- echo "Dynamic blacklisting is not enabled in the current $PRODUCT configuration" >&2
+ echo "Dynamic blacklisting is not enabled in the current $g_product configuration" >&2
exit 2
fi
@@ -1064,7 +1064,7 @@ allow_command() {
done
[ -n "$nolock" ] || mutex_off
else
- error_message "ERROR: $PRODUCT is not started"
+ error_message "ERROR: $g_product is not started"
exit 2
fi
}
diff --git a/Shorewall6/shorewall6 b/Shorewall6/shorewall6
index f0275127e..1e1dec4a2 100755
--- a/Shorewall6/shorewall6
+++ b/Shorewall6/shorewall6
@@ -1496,7 +1496,7 @@ MUTEX_TIMEOUT=
SHAREDIR=/usr/share/shorewall6
CONFDIR=/etc/shorewall6
-export PRODUCT="Shorewall6"
+g_product="Shorewall6"
export RECOVERING=
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir
diff --git a/docs/configuration_file_basics.xml b/docs/configuration_file_basics.xml
index 95716e1fa..ce3b1b1e9 100644
--- a/docs/configuration_file_basics.xml
+++ b/docs/configuration_file_basics.xml
@@ -643,7 +643,7 @@ SHELL cat /etc/shorewall/rules.d/*.rules
PREVIEW
- PRODUCT
+ PRODUCT
PROFILE
diff --git a/manpages/shorewall-params.xml b/manpages/shorewall-params.xml
index 70761d3c2..178e9f2a4 100644
--- a/manpages/shorewall-params.xml
+++ b/manpages/shorewall-params.xml
@@ -60,7 +60,7 @@
PREVIEW
- PRODUCT
+ PRODUCT
PROFILE
diff --git a/manpages6/shorewall6-params.xml b/manpages6/shorewall6-params.xml
index c2af9a4b6..915ba63ef 100644
--- a/manpages6/shorewall6-params.xml
+++ b/manpages6/shorewall6-params.xml
@@ -61,7 +61,7 @@
PREVIEW
- PRODUCT
+ PRODUCT
PROFILE