$NetBSD$ --- 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 install_device= force_lba= @@ -86,6 +86,12 @@ gnu*) tmp_disk=`echo "$1" | sed 's%\([sh]d[0-9]*\).*%\1%'` tmp_part=`echo "$1" | sed "s%$tmp_disk%%"` ;; + netbsd*) + tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([sw]d[0-9]*\).*$%r\1d%' \ + | sed 's%r\{0,1\}\(fd[0-9]*\).*$%r\1a%'` + tmp_part=`echo "$1" \ + | sed "s%.*/r\{0,1\}[sw]d[0-9]\([abe-p]\)%\1%"` + ;; freebsd*) tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([saw]d[0-9]*\).*$%r\1%' \ | sed 's%r\{0,1\}\(da[0-9]*\).*$%r\1%'` @@ -128,6 +134,14 @@ | sed "s%)%,$tmp_bsd_partition)%"` fi echo "$tmp_drive" ;; + netbsd*) + if echo $tmp_part | grep "^[abe-p]$" >/dev/null; then + tmp_bsd_partition=`echo "$tmp_part" \ + | sed "s%\([a-p]\)$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,$tmp_bsd_partition)%"` + fi + echo "$tmp_drive" ;; freebsd*) if echo $tmp_part | grep "^s" >/dev/null; then tmp_pc_slice=`echo $tmp_part \ @@ -135,13 +149,6 @@ tmp_drive=`echo "$tmp_drive" \ | sed "s%)%,\`expr "$tmp_pc_slice" - 1\`)%"` fi - if echo $tmp_part | grep "[a-h]$" >/dev/null; then - tmp_bsd_partition=`echo "$tmp_part" \ - | sed "s%s\{0,1\}[0-9]*\([a-h]\)$%\1%"` - tmp_drive=`echo "$tmp_drive" \ - | sed "s%)%,$tmp_bsd_partition)%"` - fi - echo "$tmp_drive" ;; esac else # If no partition is specified, just print the drive name. @@ -191,8 +198,8 @@ fi # Initialize these directories here, since ROOTDIR was initialized. -bootdir=${rootdir}/boot -grubdir=${bootdir}/grub +bootdir=${rootdir}/grub +grubdir=${bootdir} device_map=${grubdir}/device.map # Check if GRUB is installed