mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
Adopt some ideas from autoconf regarding shell portability
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@329 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
fbebe29b4d
commit
dad45a396f
@ -315,15 +315,6 @@ monitor_firewall() # $1 = timeout -- if negative, prompt each time that
|
||||
|
||||
qt which awk && { haveawk=Yes; determine_zones; } || haveawk=
|
||||
|
||||
case `echo -e` in
|
||||
-e*)
|
||||
ring_bell="echo \'\a\'"
|
||||
;;
|
||||
*)
|
||||
ring_bell="echo -e \'\a\'"
|
||||
;;
|
||||
esac
|
||||
|
||||
while true; do
|
||||
display_chains
|
||||
|
||||
@ -341,13 +332,13 @@ monitor_firewall() # $1 = timeout -- if negative, prompt each time that
|
||||
if [ "$rejects" != "$oldrejects" ]; then
|
||||
oldrejects="$rejects"
|
||||
|
||||
$ring_bell
|
||||
$RING_BELL
|
||||
|
||||
packet_log 20
|
||||
|
||||
if [ "$pause" = "Yes" ]; then
|
||||
echo
|
||||
echo -n 'Enter any character to continue: '
|
||||
echo $ECHO_N 'Enter any character to continue: '
|
||||
read foo
|
||||
else
|
||||
timed_read
|
||||
@ -416,15 +407,6 @@ logwatch() # $1 = timeout -- if negative, prompt each time that
|
||||
|
||||
qt which awk && haveawk=Yes || haveawk=
|
||||
|
||||
case `echo -e` in
|
||||
-e*)
|
||||
ring_bell="echo \'\a\'"
|
||||
;;
|
||||
*)
|
||||
ring_bell="echo -e \'\a\'"
|
||||
;;
|
||||
esac
|
||||
|
||||
while true; do
|
||||
clear
|
||||
echo "$banner `date`"
|
||||
@ -440,13 +422,13 @@ logwatch() # $1 = timeout -- if negative, prompt each time that
|
||||
if [ "$rejects" != "$oldrejects" ]; then
|
||||
oldrejects="$rejects"
|
||||
|
||||
$ring_bell
|
||||
$RING_BELL
|
||||
|
||||
packet_log 40
|
||||
|
||||
if [ "$pause" = "Yes" ]; then
|
||||
echo
|
||||
echo -n 'Enter any character to continue: '
|
||||
echo $ECHO_N 'Enter any character to continue: '
|
||||
read foo
|
||||
else
|
||||
timed_read
|
||||
@ -587,6 +569,24 @@ banner="Shorewall-$version Status at $HOSTNAME -"
|
||||
|
||||
get_statedir
|
||||
|
||||
case `echo -e` in
|
||||
-e*)
|
||||
RING_BELL="echo \'\a\'"
|
||||
;;
|
||||
*)
|
||||
RING_BELL="echo -e \'\a\'"
|
||||
;;
|
||||
esac
|
||||
|
||||
case `echo -n "Testing"` in
|
||||
-n*)
|
||||
ECHO_N=
|
||||
;;
|
||||
*)
|
||||
ECHO_N=-n
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart|reset|clear|refresh|check)
|
||||
[ $# -ne 1 ] && usage 1
|
||||
|
Loading…
Reference in New Issue
Block a user