mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 14:20:40 +01:00
Another tweak to syslog_circular_buffer()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3890a5c1fd
commit
ca0ac0473c
@ -143,35 +143,8 @@ timed_read ()
|
||||
}
|
||||
|
||||
#
|
||||
# Determine if 'syslog -C' is running
|
||||
# Determine if 'syslogd -C' or logd -S is running
|
||||
#
|
||||
find_logger() {
|
||||
while read pid tty stat time path args; do
|
||||
case $path in
|
||||
syslogd|*/syslogd)
|
||||
for arg in $args; do
|
||||
case $arg in
|
||||
-C*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
logd|*/logd)
|
||||
for arg in $args; do
|
||||
case $arg in
|
||||
-S*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
syslog_circular_buffer() {
|
||||
local pid
|
||||
local tty
|
||||
@ -181,7 +154,31 @@ syslog_circular_buffer() {
|
||||
local args
|
||||
local arg
|
||||
|
||||
ps w 2> /dev/null | find_logger
|
||||
ps w 2> /dev/null | (
|
||||
while read pid tty stat time path args; do
|
||||
case $path in
|
||||
syslogd|*/syslogd)
|
||||
for arg in $args; do
|
||||
case $arg in
|
||||
-C*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
logd|*/logd)
|
||||
for arg in $args; do
|
||||
case $arg in
|
||||
-S*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
return 1 )
|
||||
}
|
||||
|
||||
setup_logread() {
|
||||
|
Loading…
Reference in New Issue
Block a user