Bug#526741: creates faulty terminal instructions

Tim Durack tdurack at gmail.com
Tue May 12 16:00:56 UTC 2009


With patch applied:

Generating grub.cfg ...

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
+ '[' x0 = x ']'
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
+ '[' x5 = x ']'
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
+ '[' x = x ']'
+ GRUB_GFXMODE=640x480

cat << EOF
set default=${GRUB_DEFAULT}
set timeout=${GRUB_TIMEOUT}
EOF
+ cat

[ -z "${GRUB_TERMINAL_INPUT}" ] &&
GRUB_TERMINAL_INPUT=${GRUB_TERMINAL_OUTPUT}
+ '[' -z '' ']'
+ GRUB_TERMINAL_INPUT=serial

case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
  serial:* | *:serial)
    if ! test -e ${grub_prefix}/serial.mod ; then
      echo "Serial terminal not available on this platform." >&2 ; exit 1
    fi

    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
      grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is
unspecified. Default parameters will be used."
      GRUB_SERIAL_COMMAND=serial
    fi
    echo "${GRUB_SERIAL_COMMAND}"
  ;;
esac
+ case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
+ test -e /boot/grub/serial.mod
+ '[' 'xserial --unit=0 --speed=115200' = x ']'
+ echo 'serial --unit=0 --speed=115200'

case x${GRUB_TERMINAL_INPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_input
  terminal ${GRUB_TERMINAL_INPUT}
fi
EOF
  ;;
esac
+ case x${GRUB_TERMINAL_INPUT} in
+ cat

case x${GRUB_TERMINAL_OUTPUT} in
 xgfxterm)
    # Make the font accessible
    prepare_grub_to_access_device `${grub_probe} --target=device
${GRUB_FONT_PATH}`

    # Pick a video backend
    video_backend=
    for i in vbe ; do
      if test -e ${grub_prefix}/$i.mod ; then
        video_backend=$i
        break
      fi
    done
    if ! [ "${video_backend}" ] ; then
      echo "No suitable backend could be found for gfxterm." >&2 ; exit 1
    fi

    cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
  set gfxmode=${GRUB_GFXMODE}
  insmod gfxterm
  insmod ${video_backend}
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
EOF
  ;;
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal ${GRUB_TERMINAL_OUTPUT}
fi
EOF
  ;;
esac
+ case x${GRUB_TERMINAL_OUTPUT} in
+ cat

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
+ '[' x0 = x ']'
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
+ '[' x5 = x ']'
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
+ '[' x = x ']'
+ GRUB_GFXMODE=640x480

cat << EOF
set default=${GRUB_DEFAULT}
set timeout=${GRUB_TIMEOUT}
EOF
+ cat

case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
  serial:* | *:serial)
    if ! test -e ${grub_prefix}/serial.mod ; then
      echo "Serial terminal not available on this platform." >&2 ; exit 1
    fi

    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
      grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is
unspecified. Default parameters will be used."
      GRUB_SERIAL_COMMAND=serial
    fi
    echo "${GRUB_SERIAL_COMMAND}"
  ;;
esac
+ case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
+ test -e /boot/grub/serial.mod
+ '[' 'xserial --unit=0 --speed=115200' = x ']'
+ echo 'serial --unit=0 --speed=115200'

case x${GRUB_TERMINAL_INPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_input
  terminal ${GRUB_TERMINAL_INPUT}
fi
EOF
  ;;
esac
+ case x${GRUB_TERMINAL_INPUT} in

case x${GRUB_TERMINAL_OUTPUT} in
 xgfxterm)
    # Make the font accessible
    prepare_grub_to_access_device `${grub_probe} --target=device
${GRUB_FONT_PATH}`

    # Pick a video backend
    video_backend=
    for i in vbe ; do
      if test -e ${grub_prefix}/$i.mod ; then
        video_backend=$i
        break
      fi
    done
    if ! [ "${video_backend}" ] ; then
      echo "No suitable backend could be found for gfxterm." >&2 ; exit 1
    fi

    cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
  set gfxmode=${GRUB_GFXMODE}
  insmod gfxterm
  insmod ${video_backend}
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
EOF
  ;;
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal ${GRUB_TERMINAL_OUTPUT}
fi
EOF
  ;;
esac
+ case x${GRUB_TERMINAL_OUTPUT} in
+ cat
Found linux image: /boot/vmlinuz-2.6.29-2-686
Found initrd image: /boot/initrd.img-2.6.29-2-686
Found linux image: /boot/vmlinuz-2.6.29-1-686
Found initrd image: /boot/initrd.img-2.6.29-1-686
done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20090512/7bf16bc5/attachment.htm>


More information about the Pkg-grub-devel mailing list