mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
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:
parent
12cac4cb0d
commit
6e68aa0dfe
@ -92,7 +92,11 @@ get_config() {
|
|||||||
|
|
||||||
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
|
[ -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
|
echo "LOGFILE ($LOGFILE) does not exist!" >&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
@ -100,7 +104,7 @@ get_config() {
|
|||||||
# See if we have a real version of "tail" -- use separate redirection so
|
# See if we have a real version of "tail" -- use separate redirection so
|
||||||
# that ash (aka /bin/sh on LRP) doesn't crap
|
# 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"
|
realtail="Yes"
|
||||||
else
|
else
|
||||||
realtail=""
|
realtail=""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user