Remove useless code in setup_CONS so it will work on the Management NOde
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15223 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
b5d6951f62
commit
a3caf9e5aa
@ -488,54 +488,37 @@ sub setup_CONS
|
||||
my ($nodename) = @_;
|
||||
my $rc = 0;
|
||||
|
||||
# read DB for nodeinfo
|
||||
my $master;
|
||||
my $os;
|
||||
my $arch;
|
||||
my $cmd;
|
||||
my $retdata = xCAT::ServiceNodeUtils->readSNInfo($nodename);
|
||||
if ($retdata->{'arch'})
|
||||
{ # no error
|
||||
$master = $retdata->{'master'};
|
||||
$os = $retdata->{'os'};
|
||||
$arch = $retdata->{'arch'};
|
||||
|
||||
# make the consever 8 configuration file
|
||||
my $cmdref;
|
||||
$cmdref->{command}->[0] = "makeconservercf";
|
||||
$cmdref->{arg}->[0] = "-l";
|
||||
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
|
||||
$cmdref->{svboot}->[0] = "yes";
|
||||
no strict "refs";
|
||||
my $modname = "conserver";
|
||||
${"xCAT_plugin::" . $modname . "::"}{process_request}
|
||||
my $cmdref;
|
||||
$cmdref->{command}->[0] = "makeconservercf";
|
||||
$cmdref->{arg}->[0] = "-l";
|
||||
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
|
||||
$cmdref->{svboot}->[0] = "yes";
|
||||
no strict "refs";
|
||||
my $modname = "conserver";
|
||||
${"xCAT_plugin::" . $modname . "::"}{process_request}
|
||||
->($cmdref, \&xCAT::Client::handle_response);
|
||||
|
||||
# start conserver. conserver needs 2 CA files to start
|
||||
my $ca_file1 = "/etc/xcat/ca/ca-cert.pem";
|
||||
my $ca_file2 = "/etc/xcat/cert/server-cred.pem";
|
||||
if (!-e $ca_file1)
|
||||
{
|
||||
print
|
||||
"conserver cannot be started because the file $ca_file1 cannot be found\n";
|
||||
}
|
||||
elsif (!-e $ca_file2)
|
||||
{
|
||||
print
|
||||
"conserver cannot be started because the file $ca_file2 cannot be found\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
my $rc = xCAT::Utils->startService("conserver");
|
||||
if ($rc != 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
# start conserver. conserver needs 2 CA files to start
|
||||
my $ca_file1 = "/etc/xcat/ca/ca-cert.pem";
|
||||
my $ca_file2 = "/etc/xcat/cert/server-cred.pem";
|
||||
if (!-e $ca_file1)
|
||||
{
|
||||
print
|
||||
"conserver cannot be started because the file $ca_file1 cannot be found\n";
|
||||
}
|
||||
elsif (!-e $ca_file2)
|
||||
{
|
||||
print
|
||||
"conserver cannot be started because the file $ca_file2 cannot be found\n";
|
||||
}
|
||||
else
|
||||
{ # error reading Db
|
||||
$rc = 1;
|
||||
{
|
||||
my $rc = xCAT::Utils->startService("conserver");
|
||||
if ($rc != 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return $rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user