Added patch from Gustavo Zacharias <gustavoz@gentoo.org> for some fun silo-fu on...
authorChris Gianelloni <wolf31o2@gentoo.org>
Tue, 25 Apr 2006 18:33:44 +0000 (18:33 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Tue, 25 Apr 2006 18:33:44 +0000 (18:33 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1127 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/support/create-iso.sh

index 7c563cabac01a443f31d2a66627bdf8e44d61745..41852d1c70698152e2237309ae49be4ec400c7bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.612 2006/04/25 17:13:28 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.613 2006/04/25 18:33:44 wolf31o2 Exp $
+
+  25 Apr 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/support/create-iso.sh:
+  Added patch from Gustavo Zacharias <gustavoz@gentoo.org> for some fun
+  silo-fu on SPARC.
 
   25 Apr 2006; Eric Edgar <rocket@gentoo.org>
   modules/generic_stage_target.py:
index 7c2f311900ea1bf58d298d80cb5d332b2b62ea07..c85d41894b1f6b380f8fc7f85044d022823f2456 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.29 2006/02/09 12:16:03 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/create-iso.sh,v 1.30 2006/04/25 18:33:44 wolf31o2 Exp $
 
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
@@ -268,35 +268,58 @@ case ${clst_mainarch} in
                esac
        ;;
        sparc*)
-               # Old silo + patched mkisofs fubar magic
-               # Only silo 1.2.x seems to work for most hardware
-               # Seems silo 1.3.x+ breaks on newer machines
-               # when booting from CD (current as of silo 1.4.8)
-               mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp 
-               case ${clst_fstype} in
-                       zisofs)
-                       echo "Running mkisofs.sparc.fu to create iso image...."
-                       echo "/tmp/mkisofs.sparc.fu -z -o ${1} -D -r -pad -quiet -S \
-                               'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'"
-                       echo "-V \"${clst_iso_volume_id}\" ${clst_target_path}"
-                       /tmp/mkisofs.sparc.fu -z -o ${1} -D -r -pad -quiet -S 'boot/cd.b' \
-                               -B '/boot/second.b' -s '/boot/silo.conf'\
-                               -V "${clst_iso_volume_id}" ${clst_target_path} \
-                               || die "Cannot make ISO image"
-                       ;;
-                       *)
-                       echo "Running mkisofs.sparc.fu to create iso image...."
-                       echo "/tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S \
-                               'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'"
-                       echo "-V \"${clst_iso_volume_id}\" ${clst_target_path}"
-                       /tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S 'boot/cd.b' \
-                               -B '/boot/second.b' -s '/boot/silo.conf'\
-                               -V "${clst_iso_volume_id}" ${clst_target_path} \
-                               || die "Cannot make ISO image"
-                       ;;
-               esac
+               # Old silo (<=1.2.6) requires a specially built mkisofs
+               # We try to autodetect this in a simple way, said mkisofs
+               # should be in the cdtar, otherwise use the new style.
+               if [ -x ${clst_target_path}/boot/mkisofs.sparc.fu ]
+               then
+                       mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp 
+                       case ${clst_fstype} in
+                               zisofs)
+                               echo "Running mkisofs.sparc.fu to create iso image...."
+                               echo "/tmp/mkisofs.sparc.fu -z -o ${1} -D -r -pad -quiet -S \
+                                       'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'"
+                               echo "-V \"${clst_iso_volume_id}\" ${clst_target_path}"
+                               /tmp/mkisofs.sparc.fu -z -o ${1} -D -r -pad -quiet -S 'boot/cd.b' \
+                                       -B '/boot/second.b' -s '/boot/silo.conf'\
+                                       -V "${clst_iso_volume_id}" ${clst_target_path} \
+                                       || die "Cannot make ISO image"
+                               ;;
+                               *)
+                               echo "Running mkisofs.sparc.fu to create iso image...."
+                               echo "/tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S \
+                                       'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf'"
+                               echo "-V \"${clst_iso_volume_id}\" ${clst_target_path}"
+                               /tmp/mkisofs.sparc.fu -o ${1} -D -r -pad -quiet -S 'boot/cd.b' \
+                                       -B '/boot/second.b' -s '/boot/silo.conf'\
+                                       -V "${clst_iso_volume_id}" ${clst_target_path} \
+                                       || die "Cannot make ISO image"
+                               ;;
+                       esac
+                       rm /tmp/mkisofs.sparc.fu
+               else
+                       case ${clst_fstype} in
+                               zisofs)
+                               echo "Running mkisofs to create iso image...."
+                               echo "mkisofs -J -R -l -z -V \"${clst_iso_volume_id}\" -o ${1} \
+                                       -G \"${clst_target_path}/boot/isofs.b\" -B ... \
+                                       ${clst_target_path}"
+                               mkisofs -J -R -l -z -V "${clst_iso_volume_id}" -o ${1} \
+                                       -G "${clst_target_path}/boot/isofs.b" -B ... \
+                                       ${clst_target_path} || die "CAnnot make ISO image"
+                               ;;
+                               *)
+                               echo "Running mkisofs to create iso image...."
+                               echo "mkisofs -J -R -l -V \"${clst_iso_volume_id}\" -o ${1} \
+                                       -G \"${clst_target_path}/boot/isofs.b\" -B ... \
+                                       ${clst_target_path}"
+                               mkisofs -J -R -l -V "${clst_iso_volume_id}" -o ${1} \
+                                       -G "${clst_target_path}/boot/isofs.b" -B ... \
+                                       ${clst_target_path} || die "CAnnot make ISO image"
+                               ;;
+                       esac
+               fi
 
-               rm /tmp/mkisofs.sparc.fu
        ;;
        x86|amd64)
                if [ -e ${clst_target_path}/boot/elilo.efi ]