2N/A#! /bin/sh
2N/Aset -e
2N/A
2N/A# grub-mkconfig helper script.
2N/A# Copyright (C) 2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc.
2N/A#
2N/A# GRUB is free software: you can redistribute it and/or modify
2N/A# it under the terms of the GNU General Public License as published by
2N/A# the Free Software Foundation, either version 3 of the License, or
2N/A# (at your option) any later version.
2N/A#
2N/A# GRUB is distributed in the hope that it will be useful,
2N/A# but WITHOUT ANY WARRANTY; without even the implied warranty of
2N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2N/A# GNU General Public License for more details.
2N/A#
2N/A# You should have received a copy of the GNU General Public License
2N/A# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
2N/A
2N/Aprefix=@prefix@
2N/Aexec_prefix=@exec_prefix@
2N/Abindir=@bindir@
2N/Alibdir=@libdir@
2N/Adatarootdir=@datarootdir@
2N/A. ${libdir}/@PACKAGE@/grub-mkconfig_lib
2N/A
2N/Aexport TEXTDOMAIN=@PACKAGE@
2N/Aexport TEXTDOMAINDIR=@localedir@
2N/A
2N/ACLASS="--class os"
2N/A
2N/Acase "${GRUB_DISTRIBUTOR}" in
2N/A *)
2N/A OS="Illumos"
2N/A CLASS="--class illumos ${CLASS}"
2N/A ;;
2N/Aesac
2N/A
2N/Aecho "menuentry '${OS}' ${CLASS} {"
2N/Asave_default_entry | sed -e "s/^/\t/"
2N/Aprepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
2N/Amessage="$(gettext_printf "Loading kernel of Illumos ...")"
2N/A cat << EOF
2N/A insmod gzio
2N/A if cpuid -l ; then
2N/A ISADIR=amd64
2N/A else
2N/A ISADIR=
2N/A fi
2N/A zfs-bootfs $($grub_mkrelpath /) ZFS_BOOTFS
2N/A multiboot $($grub_mkrelpath /platform/i86pc/kernel)/\$ISADIR/unix /platform/i86pc/kernel/\$ISADIR/unix -B \$ZFS_BOOTFS,console=text
2N/A module $($grub_mkrelpath /platform/i86pc)/\$ISADIR/boot_archive /platform/i86pc/\$ISADIR/boot_archive
2N/A}
2N/AEOF