From: <ch...@su...> - 2013-07-09 11:40:28
|
Hi! > +# Configuration file for syslog, syslog-ng or rsyslogd > +CONFIG_FILE="" > +# rsyslog.conf specific args. > +RSYSLOG_CONFIG="" > # Check to see if syslogd, syslog-ng or rsyslogd exists > SYSLOG_DAEMON="" > if command -v syslogd >/dev/null 2>&1; then > + CONFIG_FILE="/etc/syslog.conf" > SYSLOG_DAEMON="syslog" > elif command -v syslog-ng >/dev/null 2>&1; then > + CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf" > SYSLOG_DAEMON="syslog-ng" > elif command -v rsyslogd >/dev/null 2>&1; then > + CONFIG_FILE="/etc/rsyslog.conf" > + RSYSLOG_CONFIG='$ModLoad imuxsock.so' > SYSLOG_DAEMON="rsyslog" > fi I think that the configuration related code should have stayed in the testcase (as it is not a code to be reused). So what I would do is to detect the syslog in the lib and then use switch on the SYSLOG_DAEMON variable to set the rest of the variables in the test code. -- Cyril Hrubis ch...@su... |