From: chrubis@suse.cz
To: Peng Haitao <penght@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] syslog-lib.sh: Use lib to restart syslog service
Date: Tue, 9 Jul 2013 13:42:06 +0200 [thread overview]
Message-ID: <20130709114206.GD30721@rei> (raw)
In-Reply-To: <1373363472-19210-1-git-send-email-penght@cn.fujitsu.com>
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
chrubis@suse.cz
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-07-09 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 9:51 [LTP] [PATCH] syslog-lib.sh: Use lib to restart syslog service Peng Haitao
2013-07-09 11:42 ` chrubis [this message]
2013-07-09 11:44 ` Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130709114206.GD30721@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=penght@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.