summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Hicks <mhicks@localhost.localdomain>2008-07-14 11:52:10 -0400
committerMatt Hicks <mhicks@localhost.localdomain>2008-07-14 11:52:29 -0400
commit86eb8ff7d2f738d289b51d9b12e64e17b7efdf3b (patch)
tree83015171b48259016c7ab0e725ebed77db9d9482
parent7a58157816390fedad13a30947c23c604b34b3b1 (diff)
Making the kickstarts release and architecture independent
-rw-r--r--genome-respin/repo/conf.d/cloud-ks.cfg15
-rw-r--r--genome-respin/repo/conf.d/genome-ks.cfg15
2 files changed, 28 insertions, 2 deletions
diff --git a/genome-respin/repo/conf.d/cloud-ks.cfg b/genome-respin/repo/conf.d/cloud-ks.cfg
index 6070458..181764b 100644
--- a/genome-respin/repo/conf.d/cloud-ks.cfg
+++ b/genome-respin/repo/conf.d/cloud-ks.cfg
@@ -72,4 +72,19 @@ sed -i "s/autosign = no/autosign = yes/g" /etc/certmaster/certmaster.conf
/sbin/chkconfig --add httpd
/sbin/chkconfig httpd on
+# Determine the operating system release and version
+if [ "`grep 'Red Hat' /etc/redhat-release`" != "" ]; then
+ export RELEASE="RHEL"
+elif [ "`grep 'CentOS' /etc/redhat-release`" != "" ]; then
+ export RELEASE="CentOS"
+else
+ export RELEASE="Fedora"
+fi
+
+export VERSION=`cat /etc/redhat-release | grep -o -e "release \(.*\) " | cut -d\ -f2 | cut -d. -f1`
+
+# Download the genome repositories
+wget "http://ftp.redhat.com/pub/redhat/genome/profiles/Cloud__Appliance-$RELEASE-$VERSION-`uname -i`/$RELEASE-$VERSION-genome-noarch.repo" --output-document=/etc/yum.repos.d/$RELEASE-$VERSION-genome-noarch.repo
+wget "http://ftp.redhat.com/pub/redhat/genome/profiles/Cloud__Appliance-$RELEASE-$VERSION-`uname -i`/$RELEASE-$VERSION-genome-`uname -i`.repo" --output-document=/etc/yum.repos.d/$RELEASE-$VERSION-genome-`uname -i`.repo
+
%end
diff --git a/genome-respin/repo/conf.d/genome-ks.cfg b/genome-respin/repo/conf.d/genome-ks.cfg
index 3ba8d71..b321089 100644
--- a/genome-respin/repo/conf.d/genome-ks.cfg
+++ b/genome-respin/repo/conf.d/genome-ks.cfg
@@ -62,8 +62,19 @@ rubygem-genome-bootstrap
/sbin/chkconfig --add genome-repo-bootstrap
/sbin/chkconfig genome-repo-bootstrap on
+# Determine the operating system release and version
+if [ "`grep 'Red Hat' /etc/redhat-release`" != "" ]; then
+ export RELEASE="RHEL"
+elif [ "`grep 'CentOS' /etc/redhat-release`" != "" ]; then
+ export RELEASE="CentOS"
+else
+ export RELEASE="Fedora"
+fi
+
+export VERSION=`cat /etc/redhat-release | grep -o -e "release \(.*\) " | cut -d\ -f2 | cut -d. -f1`
+
# Download the genome repositories
-wget "http://ftp.redhat.com/pub/redhat/genome/profiles/Genome__Appliance-F8-`uname -i`/f8-genome-noarch.repo" --output-document=/etc/yum.repos.d/f8-genome-noarch.repo
-wget "http://ftp.redhat.com/pub/redhat/genome/profiles/Genome__Appliance-F8-`uname -i`/f8-genome-`uname -i`.repo" --output-document=/etc/yum.repos.d/f8-genome-`uname -i`.repo
+wget "http://ftp.redhat.com/pub/redhat/genome/profiles/Genome__Appliance-$RELEASE-$VERSION-`uname -i`/$RELEASE-$VERSION-genome-noarch.repo" --output-document=/etc/yum.repos.d/$RELEASE-$VERSION-genome-noarch.repo
+wget "http://ftp.redhat.com/pub/redhat/genome/profiles/Genome__Appliance-$RELEASE-$VERSION-`uname -i`/$RELEASE-$VERSION-genome-`uname -i`.repo" --output-document=/etc/yum.repos.d/$RELEASE-$VERSION-genome-`uname -i`.repo
%end