[Pkg-libvirt-commits] [libguestfs] 54/146: builder: Add support for RHEL 3, RHEL 4.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 17:00:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository libguestfs.

commit 6f55b22efe5c67be8b915814ae80ec244fe3f0be
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Dec 5 09:00:11 2014 +0000

    builder: Add support for RHEL 3, RHEL 4.
    
    (cherry picked from commit 212660f70f2377a2c8dface018bb7ea4cf980864)
---
 builder/website/rhel.sh | 44 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/builder/website/rhel.sh b/builder/website/rhel.sh
index e88db79..480360f 100755
--- a/builder/website/rhel.sh
+++ b/builder/website/rhel.sh
@@ -35,6 +35,26 @@ tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
 guestroot=/dev/sda3
 
 case $version in
+    3.*)
+        major=3
+        minor=`echo $version | awk -F. '{print $2}'`
+        topurl=http://download.devel.redhat.com/released/RHEL-$major/U$minor/AS
+        tree=$topurl/x86_64/tree
+        srpms=$topurl/x86_64/tree/SRPMS
+        bootfs=ext2
+        rootfs=ext3
+        guestroot=/dev/sda2
+        ;;
+    4.*)
+        major=4
+        minor=`echo $version | awk -F. '{print $2}'`
+        topurl=http://download.devel.redhat.com/released/RHEL-$major/U$minor/AS
+        tree=$topurl/x86_64/tree
+        srpms=$topurl/x86_64/tree/SRPMS
+        bootfs=ext2
+        rootfs=ext3
+        guestroot=/dev/sda2
+        ;;
     5.*)
         major=5
         minor=`echo $version | awk -F. '{print $2}'`
@@ -82,10 +102,22 @@ keyboard us
 network --bootproto dhcp
 rootpw builder
 firewall --enabled --ssh
-selinux --enforcing
 timezone --utc America/New_York
 EOF
 
+if [ $major -le 4 ]; then
+cat >> $ks <<EOF
+langsupport en_US
+mouse generic
+EOF
+fi
+
+if [ $major -ge 4 ]; then
+cat >> $ks <<EOF
+selinux --enforcing
+EOF
+fi
+
 if [ $major -eq 5 ]; then
 cat >> $ks <<EOF
 key --skip
@@ -100,9 +132,17 @@ part /boot --fstype=$bootfs --size=512         --asprimary
 part swap                   --size=1024        --asprimary
 part /     --fstype=$rootfs --size=1024 --grow --asprimary
 
+EOF
+
+if [ $major -ge 4 ]; then
+cat >> $ks <<EOF
 # Halt the system once configuration has finished.
 poweroff
 
+EOF
+fi
+
+cat >> $ks <<EOF
 %packages
 @core
 EOF
@@ -173,9 +213,11 @@ virt-install \
     --nographics \
     --noreboot
 
+if [ $major -ge 5 ]; then
 # We have to replace yum config so it doesn't try to use RHN (it
 # won't be registered).
 guestfish --rw -a $output -m $guestroot \
   upload $yum /etc/yum.repos.d/download.devel.redhat.com.repo
+fi
 
 source $(dirname "$0")/compress.sh $output

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list