From eb8a69896f21688df0cd00206028c8a23a5a8129 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Mon, 6 Apr 2009 17:12:31 +0000 Subject: [PATCH] -updated! "install xCATsn" if xCATsn is not installed in Linux; git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3103 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/servicenode | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/xCAT/postscripts/servicenode b/xCAT/postscripts/servicenode index 6993ac45d..fd35b9217 100755 --- a/xCAT/postscripts/servicenode +++ b/xCAT/postscripts/servicenode @@ -26,7 +26,6 @@ use lib "$::XCATROOT/lib/perl"; # MAIN use strict; use IO::Socket; -use IO::Socket::SSL; # MAIN @@ -62,12 +61,32 @@ else &runcmd("rpm -e OpenIPMI-tools"); &runcmd("rpm -e tftp-server"); - if ($ENV{'NODESETSTATE'} eq "install") - { - $msg = "Installing xCAT"; - `logger -t xcat $msg`; - &runcmd("rpm -ivh /xcatpost/xcat/RPMS/*/*.rpm"); - } + + if (`rpm -q xCATsn` =~ /package xCATsn is not installed/) { + #xCATsn package has not been installed yet + $msg = "Installing xCAT"; + `logger -t xcat $msg`; + if ( -f "/etc/SuSE-release") { #special case for SLES11 + &runcmd("rpm -e perl-doc"); #perl-doc conflicts with perl-Version which will be installed + } + &runcmd("rpm -ivh /xcatpost/xcat/RPMS/*/*.rpm"); + } + #if ($ENV{'NODESETSTATE'} eq "install") + #{ + # $msg = "Installing xCAT"; + # `logger -t xcat $msg`; + # if(-f "/etc/SuSE-release") { + ## # `pkill -9 y2base`; + # $msg = "xCATsn for SuSE"; + # `logger -t xCAT $msg`; + #$msg=`zypper ar -t plaindir file:/xcatpost/xcat/RPMS xcatsn > /root/dbg.log 2>&1`; + #`logger -t xCAT "$msg"`; + #`zypper install -y xCAT-server xCAT-client perl-xCAT perl-DBD-mysql xCATsn vsftpd perl-IO-Socket-SSL`; + #`rpm -ivh /xcatpost/xcat/RPMS/*.rpm`; + # }else { + # &runcmd("rpm -ivh /xcatpost/xcat/RPMS/*/*.rpm"); + #} + #} &runcmd("/opt/xcat/sbin/copycerts"); } @@ -248,6 +267,7 @@ sub getcreds ##################################################### sub getresponse { + require IO::SOCKET::SSL; my ($req) = @_; my $port = "3001";