Make bell-ringing echo command more robust

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@328 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2002-11-11 15:12:52 +00:00
parent 18a6aff46a
commit fbebe29b4d

View File

@ -315,6 +315,15 @@ 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
@ -332,11 +341,7 @@ monitor_firewall() # $1 = timeout -- if negative, prompt each time that
if [ "$rejects" != "$oldrejects" ]; then
oldrejects="$rejects"
if [ -n "$BASH_VERSION" ]; then
echo -e '\a'
else
echo '\a'
fi
$ring_bell
packet_log 20
@ -411,6 +416,15 @@ 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`"
@ -426,11 +440,7 @@ logwatch() # $1 = timeout -- if negative, prompt each time that
if [ "$rejects" != "$oldrejects" ]; then
oldrejects="$rejects"
if [ -n "$BASH_VERSION" ]; then
echo -e '\a'
else
echo '\a'
fi
$ring_bell
packet_log 40