fix for bug 2972173: do not add ssl configuration if the ssl is not compiled into conserver code

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5515 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-03-18 02:47:23 +00:00
parent c81a181cf0
commit 8e9bcd05dc

View File

@ -188,11 +188,18 @@ sub docfheaders {
my $skip = 0;
my @meat = grep(!/^#/,@$content);
unless (grep(/^config \* {/,@meat)) {
push @newheaders,"config * {\n";
push @newheaders," sslrequired yes;\n";
push @newheaders," sslauthority /etc/xcat/cert/ca.pem;\n";
push @newheaders," sslcredentials /etc/xcat/cert/server-cred.pem;\n";
push @newheaders,"}\n";
# do not add the ssl configurations
# if conserver is not compiled with ssl support
my $cmd = "console -h 2>&1";
my $output = xCAT::Utils->runcmd($cmd, -1);
if ($output !~ "encryption not compiled")
{
push @newheaders,"config * {\n";
push @newheaders," sslrequired yes;\n";
push @newheaders," sslauthority /etc/xcat/cert/ca.pem;\n";
push @newheaders," sslcredentials /etc/xcat/cert/server-cred.pem;\n";
push @newheaders,"}\n";
}
}
unless (grep(/^default cyclades/,@meat)) {
push @newheaders,"default cyclades { type host; portbase 7000; portinc 1; }\n"