From 4bf35a8a80ceb6ac021685cf70f7769cd7989824 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 25 Mar 2008 19:59:14 +0000 Subject: [PATCH] Always start syslogd when daemon started git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@886 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/ASYSLOGsn.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/ASYSLOGsn.pm b/xCAT-server-2.0/lib/xcat/plugins/ASYSLOGsn.pm index e0cdf05e0..ac9aa698a 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/ASYSLOGsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/ASYSLOGsn.pm @@ -79,18 +79,18 @@ sub setup_SYSLOG { # need to add ` echo "*.debug /var/log/messages" >> /etc/syslog.conf`; `echo "*.crit /var/log/messages" >> /etc/syslog.conf`; - $cmd = "service syslog restart"; + } + $cmd = "service syslog restart"; + xCAT::Utils->runcmd($cmd, -1); + if ($::RUNCMD_RC != 0) + { # error try rsyslog + $cmd = "service rsyslog restart"; xCAT::Utils->runcmd($cmd, -1); if ($::RUNCMD_RC != 0) - { # error try rsyslog - $cmd = "service rsyslog restart"; - xCAT::Utils->runcmd($cmd, -1); - if ($::RUNCMD_RC != 0) - { # error on both - xCAT::MsgUtils->message("S", + { # error on both + xCAT::MsgUtils->message("S", "Error could not start syslog or rsyslog"); - return 1; - } + return 1; } } }