change to system calls

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1368 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2008-05-13 15:11:50 +00:00
parent b7e5a7116f
commit 75310e581d

View File

@ -53,7 +53,13 @@ sub handled_commands
if ($rc == 2)
{ # service setup, just start the daemon
$cmd = "service named start";
xCAT::Utils->runcmd($cmd, -1);
system $cmd;
if ($? > 0)
{ # error
xCAT::MsgUtils->message("S", "Error on command: $cmd");
return 1;
}
}
}
}
@ -91,22 +97,20 @@ sub setup_DNS
# turn DNS on
$cmd = "chkconfig named on";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0)
system $cmd;
if ($? > 0)
{
xCAT::MsgUtils->message("S", "Error from $cmd");
return 1;
}
$cmd = "service named restart";
system $cmd;
if ($? > 0)
{
xCAT::MsgUtils->message("S", "Error from $cmd");
return 1;
}
$cmd = "service named stop";
xCAT::Utils->runcmd($cmd, -1);
$cmd = "service named start";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0)
{
xCAT::MsgUtils->message("S", "Error from $cmd");
return 1;
}
return 0;
}