From df78ea0e515717de3c2ccbc032a879a5d9c0b4e9 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Fri, 1 Jun 2012 08:55:38 +0000 Subject: [PATCH] Updated GPFS postinstall script to install gpfs update rpms. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12988 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/IBMhpc/gpfs/gpfs_updates | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/gpfs/gpfs_updates b/xCAT-IBMhpc/share/xcat/IBMhpc/gpfs/gpfs_updates index e7ffdbfc8..e69f75aff 100755 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/gpfs/gpfs_updates +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/gpfs/gpfs_updates @@ -31,6 +31,40 @@ if [ -n "$1" ]; then fi OS=`uname` +INSTALL_DIR='/install' +UPDATES_DIR='post/otherpkgs/gpfs_updates' + +if [ $OS != "AIX" ]; then + if [ $NODESETSTATE == "install" ] || [ $NODESETSTATE == "boot" ]; then + # Being run from a stateful install postscript + # Copy rpms directly from the xCAT management node and install + mkdir -p /tmp/gpfs_updates + rm -f -R /tmp/gpfs_updates/* + cd /tmp/gpfs_updates + wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 10 -T 60 -nH --cut-dirs=3 ftp://$SITEMASTER/$UPDATES_DIR/*.rpm 2> /tmp/wget.log + if [ -n "`ls *.rpm 2> /dev/null`" ] ; then + rpm -Uvh *.rpm + fi + rm -f -R /tmp/gpfs_updates + fi + + if [ $NODESETSTATE == "genimage" ]; then + if [ -d $INSTALL_DIR/$UPDATES_DIR ] ; then + # Being called from .postinstall script + # Assume we are on the same machine + if [[ $OS = sles* ]] || [[ $OS = suse* ]] || [[ -f /etc/SuSE-release ]]; then + # For SLES, assume zypper is available on the system running genimage + zypper -R $installroot ar file:$INSTALL_DIR/$UPDATES_DIR gpfs_updates + # zypper -R $installroot install gpfs.gplbin* + zypper -R $installroot update gpfs* + zypper -R $installroot rr gpfs_updates + else + # For Redhat, etc., assume yum is available on the system running genimage + yum -y --installroot $installroot --nogpgcheck localupdate $INSTALL_DIR/$UPDATES_DIR/*.rpm + fi + fi + fi +fi ## Create an empty nsddevices script for GPFS ## This assumes that the node is NOT an NSD server