summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-06-24 13:46:54 +1000
committerMartin Schwenke <martin@meltin.net>2014-07-02 14:17:17 +1000
commit772070f49ea1a91c260c0fc1718e40368c59edde (patch)
treea06a282f70df448dbbd10d19cfce36c6a8385007 /base
parentbfe5a41089dc1e1ac7747b7dd778144602d23625 (diff)
downloadautocluster-772070f49ea1a91c260c0fc1718e40368c59edde.tar.gz
autocluster-772070f49ea1a91c260c0fc1718e40368c59edde.tar.xz
autocluster-772070f49ea1a91c260c0fc1718e40368c59edde.zip
Rework package installation during post-boot configuration
* New script install_packages.sh is the single entry-point for installing packages outside kickstart. * New configuration variable CONFIG_EXTRA_PACKAGES has space-separated list of extra packages to install. This can help if dependencies are broken. * Rename install_gpfs_nas.sh to just install_nas.sh, now just installs packages (e.g. samba, ctdb, rssh) to support protocols. * Rename install_gpfs.sh to install_clusterfs_gpfs.sh to provide a hook to support installation of alternate cluster filesystem packages. Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'base')
-rwxr-xr-xbase/all/root/scripts/install_clusterfs_gpfs.sh (renamed from base/all/root/scripts/install_gpfs.sh)5
-rwxr-xr-xbase/all/root/scripts/install_gpfs_nas.sh22
-rwxr-xr-xbase/all/root/scripts/install_nas.sh13
-rwxr-xr-xbase/all/root/scripts/install_packages.sh31
4 files changed, 46 insertions, 25 deletions
diff --git a/base/all/root/scripts/install_gpfs.sh b/base/all/root/scripts/install_clusterfs_gpfs.sh
index 39b0827..86eadcb 100755
--- a/base/all/root/scripts/install_gpfs.sh
+++ b/base/all/root/scripts/install_clusterfs_gpfs.sh
@@ -1,11 +1,10 @@
#!/bin/sh
-# we have to force the base GPFS package first, due to the way gpfs updates work
+# Must 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
diff --git a/base/all/root/scripts/install_gpfs_nas.sh b/base/all/root/scripts/install_gpfs_nas.sh
deleted file mode 100755
index e971008..0000000
--- a/base/all/root/scripts/install_gpfs_nas.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/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
-# we may have just rewound the cluster, so we might be running this on
-# the node install of from kickstart.
-echo "Updating from YUM repositories"
-yum -y update
-
-$(dirname $0)/install_gpfs.sh
-
-echo "Installing tdb tools packages"
-yum -y install tdb-tools
-
-echo "Installing ctdb packages"
-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 rssh"
-yum -y install rssh
diff --git a/base/all/root/scripts/install_nas.sh b/base/all/root/scripts/install_nas.sh
new file mode 100755
index 0000000..32425ec
--- /dev/null
+++ b/base/all/root/scripts/install_nas.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+echo "Installing tdb tools packages"
+yum -y install tdb-tools
+
+echo "Installing ctdb packages"
+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 rssh"
+yum -y install rssh
diff --git a/base/all/root/scripts/install_packages.sh b/base/all/root/scripts/install_packages.sh
new file mode 100755
index 0000000..9b023c0
--- /dev/null
+++ b/base/all/root/scripts/install_packages.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+echo "Updating from YUM repositories"
+yum -y update
+
+extra_packages="@@CONFIG_EXTRA_PACKAGES@@"
+if [ -n "$extra_packages" ] ; then
+ yum -y install $extra_packages
+fi
+
+dn=$(dirname $0)
+
+for task ; do
+ case "$task" in
+ clusterfs)
+ type="@@CLUSTERFS_TYPE@@"
+ file="install_clusterfs_${type}.sh"
+ ;;
+ *)
+ file="install_${task}.sh"
+ esac
+
+ path="${dn}/${file}"
+
+ if [ ! -x "$path" ] ; then
+ echo "Unable to find script \"${file}\" to install task \"${task}\""
+ exit 1
+ fi
+
+ "$path"
+done