Add NetBSD support into grub-install.

This commit is contained in:
okuji committed 2001-12-29 18:53:30 +00:00
1 parent f70e5d2409
commit aaccdfc4ba
4 files changed
+24 -5

No files matched your search

+14
View File
@@ -96,6 +96,12 @@ convert () {
| sed "s%.*/r\{0,1\}[saw]d[0-9]\(s[0-9]*[a-h]\)%\1%" \
| sed "s%.*/r\{0,1\}da[0-9]\(s[0-9]*[a-h]\)%\1%"`
;;
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%"`
;;
*)
echo "grub-install does not support your OS yet." 1>&2
exit 1 ;;
@@ -145,6 +151,14 @@ convert () {
| 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" ;;
esac
else
# If no partition is specified, just print the drive name.