From 6ec4a80f527f0d84e74be6222fce314533cde85b Mon Sep 17 00:00:00 2001 From: Bruce Potter Date: Tue, 24 Jun 2014 16:39:05 -0400 Subject: [PATCH] adapter xcat softlayer rpm for 2.8.5 --- xCAT-SoftLayer/postscripts/configbond | 2 +- xCAT-SoftLayer/si-post-install/20all.makeinitrd | 12 +++++++----- xCAT-SoftLayer/xCAT-SoftLayer.spec | 7 ++++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/xCAT-SoftLayer/postscripts/configbond b/xCAT-SoftLayer/postscripts/configbond index 537ed5df4..5d43c3a8a 100755 --- a/xCAT-SoftLayer/postscripts/configbond +++ b/xCAT-SoftLayer/postscripts/configbond @@ -19,7 +19,7 @@ if (scalar(@ARGV) < 2 || scalar(@ARGV) > 3) { my $bond = shift(@ARGV); my $nic = $ARGV[0]; my @devs; -push(@devs,@ARGV); +foreach my $a (@ARGV) { push(@devs,split('@',$a)); } # support the new syntax in the xcat configbond postscript my $nicips = $ENV{NICIPS}; my $nicnetworks = $ENV{NICNETWORKS}; my $net_cnt = $ENV{NETWORKS_LINES}; diff --git a/xCAT-SoftLayer/si-post-install/20all.makeinitrd b/xCAT-SoftLayer/si-post-install/20all.makeinitrd index 761890045..c4a33ddc9 100755 --- a/xCAT-SoftLayer/si-post-install/20all.makeinitrd +++ b/xCAT-SoftLayer/si-post-install/20all.makeinitrd @@ -1,4 +1,5 @@ #!/bin/bash +#Used only by sysclone # This SI post-install script is needed because the initrd that autoyast/kickstart/ubuntu builds when installing # sles/rh/ubuntu on the golden node may not have the drivers when that initrd runs on the node that is @@ -9,10 +10,11 @@ # And do whatever is necessary on ubuntu. if [[ -f /sbin/dracut ]]; then - #todo: implement rh case using dracut - echo "Note: not regenerating the initrd, because dracut is not supported by this node yet." + # redhat/centos + echo "Running dracut to regenerate the initrd with the drivers needed by this node:" + dracut --force else - # suse/sles - echo "Running mkinitrd to regenerate the initrd with the drivers needed by this node:" - mkinitrd + # suse/sles + echo "Running mkinitrd to regenerate the initrd with the drivers needed by this node:" + mkinitrd fi diff --git a/xCAT-SoftLayer/xCAT-SoftLayer.spec b/xCAT-SoftLayer/xCAT-SoftLayer.spec index 7ee7e06d1..c5886c787 100644 --- a/xCAT-SoftLayer/xCAT-SoftLayer.spec +++ b/xCAT-SoftLayer/xCAT-SoftLayer.spec @@ -84,4 +84,9 @@ rm -rf $RPM_BUILD_ROOT %post # We are shipping the postscripts in a sysclone dir and then copying them to /install/postscripts here, # because we want to allow base xcat to eventually ship them and not conflict on the file name/path -cp -f /%{prefix}/share/xcat/sysclone/postscripts/* /install/postscripts +# But base xcat now has a newer/better configbond written in bash, so if that is there do not overwrite it. +head /install/postscripts/configbond | grep -q -E '^#! */bin/bash' +if [[ $? != 0 ]]; then + # the new configbond from xcat 2.8.5 is not there, so copy ours + cp -f /%{prefix}/share/xcat/sysclone/postscripts/* /install/postscripts +fi