summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeemant Kulleen <seemant@gentoo.org>2003-12-09 08:13:57 +0000
committerSeemant Kulleen <seemant@gentoo.org>2003-12-09 08:13:57 +0000
commit3a09a380ef4470365e58aaf172a8dc633083f35c (patch)
treea20110c13e04001056e70b856e8b6543d8c57ca8 /sys-boot/yaboot/files/yabootconfig-1.3.11.patch
parentadded sys-boot category for bootloaders (diff)
downloadgentoo-2-3a09a380ef4470365e58aaf172a8dc633083f35c.tar.gz
gentoo-2-3a09a380ef4470365e58aaf172a8dc633083f35c.tar.bz2
gentoo-2-3a09a380ef4470365e58aaf172a8dc633083f35c.zip
moved from sys-apps to sys-boot
Diffstat (limited to 'sys-boot/yaboot/files/yabootconfig-1.3.11.patch')
-rw-r--r--sys-boot/yaboot/files/yabootconfig-1.3.11.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/sys-boot/yaboot/files/yabootconfig-1.3.11.patch b/sys-boot/yaboot/files/yabootconfig-1.3.11.patch
new file mode 100644
index 000000000000..a6824f524517
--- /dev/null
+++ b/sys-boot/yaboot/files/yabootconfig-1.3.11.patch
@@ -0,0 +1,78 @@
+--- ybin/yabootconfig.orig 2003-02-08 23:53:46.000000000 -0500
++++ ybin/yabootconfig 2003-02-26 15:07:50.000000000 -0500
+@@ -4,6 +4,7 @@
+ ##
+ ## yabootconfig generates a simple /etc/yaboot.conf
+ ## Copyright (C) 2001, 2002, 2003 Ethan Benson
++## Patched for Gentoo and dual boot - Mark Guertin <gerk@gentoo.org>
+ ##
+ ## This program is free software; you can redistribute it and/or
+ ## modify it under the terms of the GNU General Public License
+@@ -264,6 +265,31 @@
+ return 0
+ }
+
++dualboot()
++{
++ DRIVELIST=`ls -d /dev/?d?* | grep "[sh]d[abcdefghijkl]" | cut -b 6-8 | sort -u`
++
++ for i in $DRIVELIST
++ do
++ HFS=`mac-fdisk -l "/dev/$i" | grep '\<Apple_HFS\>' | grep -v "CDROM" | cut -d" " -f1`
++ for h in $HFS
++ do
++ if [ !-x `hpmount -r $h` > /dev/null 2>&1 ] ; then
++ if [ `hpls mach_kernel 2>/dev/null` ] ; then
++ [ "$QUIET" = 0 ] && echo "Found possible OS X/Darwin partition at $h"
++ OSX=$h
++ fi
++ if [ "`hpls "System Folder" 2>/dev/null`" ] ; then
++ [ "$QUIET" = 0 ] && echo "Found possible Mac OS partition at $h"
++ MACOS=$h
++ fi
++ hpumount $h > /dev/null 2>&1
++ fi
++ done
++ done
++}
++
++
+ ##########
+ ## Main ##
+ ##########
+@@ -579,6 +605,15 @@
+ fi
+ fi
+
++## setup any Mac OS/OS X partitions
++dualboot
++if [ -n "$MACOS" ] ; then
++ MACOSBOOT="macos=${MACOS}\n"
++fi
++if [ -n "$OSX" ] ; then
++ OSXBOOT="macosx=${OSX}\n"
++fi
++
+ ## generate global section of yaboot.conf
+ GLOBAL="## yaboot.conf generated by $PRG $VERSION
+ ##
+@@ -596,7 +631,7 @@
+ IMAGES="
+ image=$IMAGE
+ \tlabel=Linux
+-\tread-only\n${APPEND:-}"
++\tread-only\n${APPEND:-}\n${OSXBOOT:-}\n${MACOSBOOT:-}"
+
+ ## safely create a tmp file then move it into place after we are sure
+ ## it was written.
+@@ -667,4 +702,10 @@
+ fi
+ fi
+
++## Give user a warning about possible b0rkage
++
++[ "$QUIET" = 0 ] && echo -e "\nConfiguration complete. If there are no errors above you should
++have a working configuration. see man yaboot.conf if you run into
++any errors."
++
+ exit 0