On 07/01/2013 10:12 PM, [email protected] wrote:
> Hi!
...
>> +if [ -n "$SYSLOG_NAME" ]; then
>> +    if [ $HAVE_SYSTEMCTL == 1 ]; then
>> +            status_daemon $SYSLOG_NAME
>> +            if [ $? -ne 0 ]; then
>> +                    restart_daemon $SYSLOG_NAME
>> +                    FLAG=1
>> +            fi
...
>> +if [ $FLAG -eq 1 ]; then
>> +    if [ $HAVE_SYSTEMCTL == 1 ]; then
>> +            stop_daemon $SYSLOG_NAME
>> +    else
>> +            $SYSLOG_NAME stop >/dev/null 2>&1
>> +    fi
>> +fi
>> +
> 
> We have similar code to restart cron in cron/cron02 and to restart nscd
> in sssd/sssd-libs.sh.
> 
> What about we create a short library with a common code to restart
> system daemons? So that any new testcase would just need to source the

A short library is in cmdlib.sh.
stop_daemon, status_daemon and restart_daemon is used in the patch.

The syslog daemon may be syslog, rsyslog, syslog-ng etc, 
so I make the patch which is similar to syslog-lib.sh.


Thanks.

-- 
Best Regards,
Peng

> lib and call:
> 
> daemon_restart "cron"
> 
> or:
> 
> daemon_stop "syslog"
> 


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to