summaryrefslogtreecommitdiff
blob: 4bc13eef8b182cc3bf92776e0c8da2e90dce40db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- yaboot-1.3.13.orig/ybin/yabootconfig	2004-11-04 21:57:17.000000000 -0500
+++ yaboot-1.3.13/ybin/yabootconfig	2004-11-04 22:40:45.503060512 -0500
@@ -5,6 +5,8 @@
 ## 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
 ## as published by the Free Software Foundation; either version 2
@@ -264,6 +266,30 @@
     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 ##
 ##########