<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Text File" newcontext="true">
<p>
$NetBSD$
</p>
<p>--- util/grub-install.in.orig	Wed Feb 28 06:19:39 2001
+++ util/grub-install.in
@@ -32,7 +32,7 @@
 grub_shell=${sbindir}/grub
 log_file=/tmp/grub-install.log.$$
 rootdir=
-grub_prefix=/boot/grub
+grub_prefix=/grub
</p>
<p> install_device=
 force_lba=
@@ -86,6 +86,12 @@
     gnu*)
 	tmp_disk=`echo &quot;$1&quot; | sed &#x27;s%\([sh]d[0-9]*\).*%\1%&#x27;`
 	tmp_part=`echo &quot;$1&quot; | sed &quot;s%$tmp_disk%%&quot;` ;;
+    netbsd*)
+	tmp_disk=`echo &quot;$1&quot; | sed &#x27;s%r\{0,1\}\([sw]d[0-9]*\).*$%r\1d%&#x27; \
+                            | sed &#x27;s%r\{0,1\}\(fd[0-9]*\).*$%r\1a%&#x27;`
+	tmp_part=`echo &quot;$1&quot; \
+	    | sed &quot;s%.*/r\{0,1\}[sw]d[0-9]\([abe-p]\)%\1%&quot;`
+	;;
     freebsd*)
 	tmp_disk=`echo &quot;$1&quot; | sed &#x27;s%r\{0,1\}\([saw]d[0-9]*\).*$%r\1%&#x27; \
 			    | sed &#x27;s%r\{0,1\}\(da[0-9]*\).*$%r\1%&#x27;`
@@ -128,6 +134,14 @@
 		    | sed &quot;s%)%,$tmp_bsd_partition)%&quot;`
 	    fi
 	    echo &quot;$tmp_drive&quot; ;;
+	netbsd*)
+	    if echo $tmp_part | grep &quot;^[abe-p]$&quot; &gt;/dev/null; then
+		tmp_bsd_partition=`echo &quot;$tmp_part&quot; \
+		    | sed &quot;s%\([a-p]\)$%\1%&quot;`
+		tmp_drive=`echo &quot;$tmp_drive&quot; \
+		    | sed &quot;s%)%,$tmp_bsd_partition)%&quot;`
+	    fi
+	    echo &quot;$tmp_drive&quot; ;;
 	freebsd*)
 	    if echo $tmp_part | grep &quot;^s&quot; &gt;/dev/null; then
 		tmp_pc_slice=`echo $tmp_part \
@@ -135,13 +149,6 @@
 		tmp_drive=`echo &quot;$tmp_drive&quot; \
 		    | sed &quot;s%)%,\`expr &quot;$tmp_pc_slice&quot; - 1\`)%&quot;`
 	    fi
-	    if echo $tmp_part | grep &quot;[a-h]$&quot; &gt;/dev/null; then
-		tmp_bsd_partition=`echo &quot;$tmp_part&quot; \
-		    | sed &quot;s%s\{0,1\}[0-9]*\([a-h]\)$%\1%&quot;`
-		tmp_drive=`echo &quot;$tmp_drive&quot; \
-		    | sed &quot;s%)%,$tmp_bsd_partition)%&quot;`
-	    fi
-	    echo &quot;$tmp_drive&quot; ;;
 	esac
     else
 	# If no partition is specified, just print the drive name.
@@ -191,8 +198,8 @@
 fi
</p>
<p> # Initialize these directories here, since ROOTDIR was initialized.
-bootdir=${rootdir}/boot
-grubdir=${bootdir}/grub
+bootdir=${rootdir}/grub
+grubdir=${bootdir}
 device_map=${grubdir}/device.map
</p>
<p> # Check if GRUB is installed
</p>
</card>
</wml>
