From ce6f1237c7fda39d303cf8b51138b24e8fe4fa00 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 1 Jun 2012 12:51:02 +1000 Subject: [PATCH] Rename gpfs-nas-postinstall.sh to install_gpfs_nas.sh and factor out GPFS fu The script name should say what it does, not what it might be used for... Also add setup_build.sh. Signed-off-by: Martin Schwenke --- base/all/root/scripts/install_gpfs.sh | 16 ++++++++++++++++ ...s-nas-postinstall.sh => install_gpfs_nas.sh} | 17 ++--------------- base/all/root/scripts/setup_build.sh | 17 +++++++++++++++++ examples/create_cluster.sh | 2 +- 4 files changed, 36 insertions(+), 16 deletions(-) create mode 100755 base/all/root/scripts/install_gpfs.sh rename base/all/root/scripts/{gpfs-nas-postinstall.sh => install_gpfs_nas.sh} (55%) create mode 100755 base/all/root/scripts/setup_build.sh diff --git a/base/all/root/scripts/install_gpfs.sh b/base/all/root/scripts/install_gpfs.sh new file mode 100755 index 0000000..9eda202 --- /dev/null +++ b/base/all/root/scripts/install_gpfs.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# we have to force the base GPFS package first, due to the way gpfs updates work +echo "Installing GPFS base" +yum -y install gpfs.base-@@GPFS_BASE_VERSION@@.@@RHEL_ARCH@@ + +# then update it + +echo "Updating GPFS base" +yum -y update + +echo "Installing remaining GPFS packages" +yum -y install gpfs.docs gpfs.gpl gpfs.msg.en_US + +echo "Rebuilding the GPFS modules" +(cd /usr/lpp/mmfs/src && make Autoconfig World InstallImages) diff --git a/base/all/root/scripts/gpfs-nas-postinstall.sh b/base/all/root/scripts/install_gpfs_nas.sh similarity index 55% rename from base/all/root/scripts/gpfs-nas-postinstall.sh rename to base/all/root/scripts/install_gpfs_nas.sh index 1784e9d..68cf0ab 100755 --- a/base/all/root/scripts/gpfs-nas-postinstall.sh +++ b/base/all/root/scripts/install_gpfs_nas.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Make this explicit so we only get RHEL updates to make things nice # and clear. This duplicates what happens in basic-postinstall.sh but @@ -7,14 +7,7 @@ echo "Updating from YUM repositories" yum -y update -# we have to force the base GPFS package first, due to the way gpfs updates work -echo "Installing GPFS base" -yum -y install gpfs.base-@@GPFS_BASE_VERSION@@.@@RHEL_ARCH@@ - -# then update it - -echo "Updating GPFS base" -yum -y update +$(dirname $0)/install_gpfs.sh echo "Installing ctdb packages" yum -y install ctdb ctdb-debuginfo ctdb-devel ctdb-tests @@ -22,11 +15,5 @@ yum -y install ctdb ctdb-debuginfo ctdb-devel ctdb-tests echo "Installing samba packages" yum -y install samba samba-debuginfo samba-client samba-doc -echo "Installing remaining GPFS packages" -yum -y install gpfs.docs gpfs.gpl gpfs.msg.en_US - -echo "Rebuilding the GPFS modules" -(cd /usr/lpp/mmfs/src && make Autoconfig World InstallImages) - echo "Installing rssh" yum -y install rssh diff --git a/base/all/root/scripts/setup_build.sh b/base/all/root/scripts/setup_build.sh new file mode 100755 index 0000000..2acccfa --- /dev/null +++ b/base/all/root/scripts/setup_build.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# +# Setup build node +# + +$(dirname $0)/install_gpfs.sh + +# Setup RPM development +echo "Installing RPM developing and setting up rpm build" +yum -y install rpmdevtools +rpmdev-setuptree + +# Packages required for samba development +echo "Installing Samba build dependencies" +yum -y install readline-devel libacl-devel \ + libxslt docbook-utils docbook-style-xsl diff --git a/examples/create_cluster.sh b/examples/create_cluster.sh index 650e5ee..474983d 100755 --- a/examples/create_cluster.sh +++ b/examples/create_cluster.sh @@ -54,7 +54,7 @@ waitfor "/var/log/kvm/serial.${n1}" "login:" 120 nodes=$(sed -r -n -e "s@.*[[:space:]](${CLUSTER}n[[:digit:]]+)\$@\1@p" /etc/hosts) # Could avoid this by creating a special base and doing it in postinstall for i in $nodes ; do - ssh -o StrictHostKeyChecking=no "$i" ./scripts/gpfs-nas-postinstall.sh + ssh -o StrictHostKeyChecking=no "$i" ./scripts/install_gpfs_nas.sh done ssh "$n1" ./scripts/setup_gpfs.sh -- 2.34.1