From a91461d715e1e629a7fdf394dba57a7d1fcc4f89 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 29 Feb 2008 14:06:01 +0000 Subject: [PATCH] fix Service Node install git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@630 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/Utils.pm | 10 +++++++++- xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm | 2 +- xCAT-server-2.0/xCAT-server.spec | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/Utils.pm b/perl-xCAT-2.0/xCAT/Utils.pm index 1a81da40b..273fe67ac 100644 --- a/perl-xCAT-2.0/xCAT/Utils.pm +++ b/perl-xCAT-2.0/xCAT/Utils.pm @@ -1403,6 +1403,12 @@ sub isServiceReq } # Need to obtain all ip addresses for service node to check # before we do the below logic + $rc = xCAT::Utils->exportDBConfig(); # export DB env + if ($rc != 0) { + xCAT::MsgUtils->message('S', "Unable export DB environment.\n"); + return -1; + + } # have this service setup if (($service eq "dhcpserver") || ($service eq "nameservers")) @@ -1503,7 +1509,9 @@ sub determinehostname $hostname = $thostname[0]; my ($hcp, $aliases, $addtype, $length, @addrs) = gethostbyname($hostname); my $ipaddress = inet_ntoa($addrs[0]); - my @hostinfo = ($hostname, $ipaddress); + # strip off domain, if there + my @shorthost=split(/\./,$hostname); + my @hostinfo = ($shorthost[0], $ipaddress); return @hostinfo; } diff --git a/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm b/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm index 06162ef1a..4d480234d 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm @@ -182,7 +182,7 @@ sub setup_NFS { my ($file_sys, $blocks, $used, $avail, $cap, $mount_point) = split(' ', $line); - if ($mount_point == $directory) + if ($mount_point eq $directory) { $found = 1; last; diff --git a/xCAT-server-2.0/xCAT-server.spec b/xCAT-server-2.0/xCAT-server.spec index d81757b78..9e5434e75 100644 --- a/xCAT-server-2.0/xCAT-server.spec +++ b/xCAT-server-2.0/xCAT-server.spec @@ -32,6 +32,7 @@ xCAT-server provides the core server and configuration management components of %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin +mkdir -p $RPM_BUILD_ROOT/%{prefix}/rc.d mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/install mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca @@ -52,6 +53,8 @@ cp -hpR share/xcat/netboot/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/ cp -d sbin/* $RPM_BUILD_ROOT/%{prefix}/sbin chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/* +cp rc.d/* $RPM_BUILD_ROOT/%{prefix}/rc.d +chmod 755 $RPM_BUILD_ROOT/%{prefix}/rc.d/* cp share/xcat/ca/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca/*