Blame | Last modification | View Log | RSS feed
#! /bin/shset -e# grub-mkconfig helper script.# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.## GRUB 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 3 of the License, or# (at your option) any later version.## GRUB is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with GRUB. If not, see <http://www.gnu.org/licenses/>.prefix=/usrexec_prefix=/usrbindir=/usr/binlibdir=/usr/lib. "/usr/share/grub/grub-mkconfig_lib"export TEXTDOMAIN=grubexport TEXTDOMAINDIR=/usr/share/localeX=80Y=24TERMINAL=ofconsoleargument () {opt=$1shiftif test $# -eq 0; thenecho "$0: option requires an argument -- '$opt'" 1>&2exit 1fiecho $1}check_terminfo () {while test $# -gt 0dooption=$1shiftcase "$option" interminfo | TERMINFO);;-g)NEWXY=`argument $option "$@"`NEWX=`echo $NEWXY | cut -d x -f 1`NEWY=`echo $NEWXY | cut -d x -f 2`if [ ${NEWX} -ge 80 ] ; thenX=${NEWX}elseecho "Warning: ${NEWX} is less than the minimum size of 80"fiif [ ${NEWY} -ge 24 ] ; thenY=${NEWY}elseecho "Warning: ${NEWY} is less than the minimum size of 24"fishift;;*)# # accept console or ofconsole# if [ "$option" != "console" -a "$option" != "ofconsole" ] ; then# echo "Error: GRUB_TERMINFO unknown console: $option"# exit 1# fi# # perfer console# TERMINAL=console# accept ofconsoleif [ "$option" != "ofconsole" ] ; thenecho "Error: GRUB_TERMINFO unknown console: $option"exit 1fi# perfer consoleTERMINAL=ofconsole;;esacdone}if ! uname -m | grep -q ppc ; thenexit 0fiif [ "x${GRUB_TERMINFO}" != "x" ] ; thenF1=`echo ${GRUB_TERMINFO} | cut -d " " -f 1`if [ "${F1}" != "terminfo" ] ; thenecho "Error: GRUB_TERMINFO is set to \"${GRUB_TERMINFO}\" The first word should be terminfo."exit 1ficheck_terminfo ${GRUB_TERMINFO}ficat << EOFterminfo -g ${X}x${Y} ${TERMINAL}EOF