From 8e9bcd05dccfcd83944ad4eb52f295f0574f8c3e Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 18 Mar 2010 02:47:23 +0000 Subject: [PATCH] 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 --- xCAT-server/lib/xcat/plugins/conserver.pm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/conserver.pm b/xCAT-server/lib/xcat/plugins/conserver.pm index 95475697d..e0d0f9e63 100644 --- a/xCAT-server/lib/xcat/plugins/conserver.pm +++ b/xCAT-server/lib/xcat/plugins/conserver.pm @@ -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"