fix bug 2688297
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2938 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
22a56bdf64
commit
e4390308bc
@ -348,14 +348,26 @@ sub makeconservercf {
|
||||
if (!$svboot) {
|
||||
#restart conserver daemon
|
||||
my $cmd;
|
||||
if (-f "/var/run/conserver.pid") {
|
||||
$cmd = "/etc/init.d/conserver stop";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
$cmd = "/etc/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if(xCAT::Utils->isAIX()){
|
||||
if (-f "/var/run/conserver.pid") {
|
||||
$cmd = "stopsrc -s conserver";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
$cmd = "startsrc -s conserver";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
} else {
|
||||
$cmd = "startsrc -s conserver";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
}
|
||||
} else {
|
||||
$cmd = "/etc/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if (-f "/var/run/conserver.pid") {
|
||||
$cmd = "/etc/init.d/conserver stop";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
$cmd = "/etc/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
} else {
|
||||
$cmd = "/etc/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -574,6 +574,51 @@ if (!-d "/var/log/consoles")
|
||||
}
|
||||
}
|
||||
|
||||
if ($::osname eq 'AIX')
|
||||
{
|
||||
if(!-f "/usr/sbin/conserver")
|
||||
{
|
||||
my $cmd = "ln -sf /opt/freeware/sbin/conserver /usr/sbin/conserver";
|
||||
my $outref = xCAT::Utils->runcmd("$cmd", 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message('E', "Could not ln -sf /opt/freeware/sbin/conserver /usr/sbin/conserver.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
xCAT::MsgUtils->message('I', "ln -sf /opt/freeware/sbin/conserver /usr/sbin/conserver.\n");
|
||||
}
|
||||
}
|
||||
if(!-f "/usr/bin/console")
|
||||
{
|
||||
$cmd = "ln -sf /opt/freeware/bin/console /usr/bin/console";
|
||||
$outref = xCAT::Utils->runcmd("$cmd", 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message('E', "Could not ln -sf /opt/freeware/bin/console /usr/bin/console.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
xCAT::MsgUtils->message('I', "ln -sf /opt/freeware/bin/console /usr/bin/console.\n");
|
||||
}
|
||||
}
|
||||
|
||||
$cmd = "lssrc -a | grep conserver";
|
||||
$outref = xCAT::Utils->runcmd("$cmd", 0);
|
||||
unless($outref =~ /conserver/)
|
||||
{
|
||||
$cmd = "mkssys -p /opt/freeware/sbin/conserver -s conserver -u 0 -S -n 15 -f 15 -a \"-o -O1 -C /etc/conserver.cf\"";
|
||||
$outref = xCAT::Utils->runcmd("$cmd", 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message('E', "Could not add subsystem conserver.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
xCAT::MsgUtils->message('I', "Add subsystem conserver.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
# some Linux-only config
|
||||
if ($::osname eq 'Linux')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user