Add to start rsyslog for Fedora.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@761 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2008-03-11 19:02:18 +00:00
parent b034ae8913
commit 1828e745c6

View File

@ -70,15 +70,28 @@ sub process_request
sub setup_SYSLOG
{
my $rc = 0;
my $cmd;
if (-e "/etc/syslog.conf")
{
my $cmd = "grep *.debug /etc/syslog.conf";
$cmd = "grep *.debug /etc/syslog.conf";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0)
{ # need to add
` echo "*.debug /var/log/messages" >> /etc/syslog.conf`;
`echo "*.crit /var/log/messages" >> /etc/syslog.conf`;
`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 on both
xCAT::MsgUtils->message("S",
"Error could not start syslog or rsyslog");
return 1;
}
}
}
}