Change for OpenWRT compatibility - Take 2

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5062 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-12-05 21:26:37 +00:00
parent 12cac4cb0d
commit 6e68aa0dfe

View File

@ -92,7 +92,11 @@ get_config() {
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
if [ ! -f $LOGFILE ]; then
if ( ps ax 2> /dev/null | qt grep 'syslogd.*-C' ) ; then
LOGREAD="logread"
elif [ -f $LOGFILE ]; then
LOGREAD="cat $LOGFILE"
else
echo "LOGFILE ($LOGFILE) does not exist!" >&2
exit 2
fi
@ -100,7 +104,7 @@ get_config() {
# See if we have a real version of "tail" -- use separate redirection so
# that ash (aka /bin/sh on LRP) doesn't crap
#
if ( tail -n5 $LOGFILE > /dev/null 2> /dev/null ) ; then
if ( tail -n5 /dev/null > /dev/null 2> /dev/null ) ; then
realtail="Yes"
else
realtail=""