2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

parse the rsyslog version

This commit is contained in:
cxhong 2020-07-21 17:01:36 -04:00
parent 1352a5cfa0
commit c29d7cafea

View File

@ -304,8 +304,8 @@ fi
# Do not even touch rsyslog.conf
# There is no /etc/sysconfig/rsyslog file, so we use rsyslogd -v to get the version
if [ -e "/sbin/rsyslogd" -o -e "/usr/sbin/rsyslogd" ]; then
SYSLOGPROD=`rsyslogd -v | grep rsyslogd |awk {'print $1'}`
SYSLOGVER=`rsyslogd -v | grep rsyslogd |awk {'print $2'}`
SYSLOGPROD=`rsyslogd -v | grep rsyslogd |grep -v PID |awk {'print $1'}`
SYSLOGVER=`rsyslogd -v | grep rsyslogd |grep -v PID |awk {'print $2'}`
if ( pmatch $SYSLOGPROD "*rsyslogd*" ) && ( pmatch $SYSLOGVER "8*" ); then
config_rsyslog_V8
#keep a record