~ubuntu-branches/debian/stretch/grub2/stretch

« back to all changes in this revision

Viewing changes to util/grub.d/00_header.in

Tags: upstream-1.98+20100705
ImportĀ upstreamĀ versionĀ 1.98+20100705

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
 
1
#! /bin/sh
 
2
set -e
2
3
 
3
4
# grub-mkconfig helper script.
4
5
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
21
22
prefix=@prefix@
22
23
exec_prefix=@exec_prefix@
23
24
libdir=@libdir@
24
 
grub_prefix=`echo /boot/grub | sed ${transform}`
25
 
locale_dir=`echo /boot/grub/locale | sed ${transform}`
 
25
locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
26
26
grub_lang=`echo $LANG | cut -d _ -f 1`
27
27
 
28
28
. ${libdir}/grub/grub-mkconfig_lib
75
75
    save_env saved_entry
76
76
  fi
77
77
}
 
78
 
 
79
function load_video {
 
80
EOF
 
81
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
 
82
    cat <<EOF
 
83
  insmod ${GRUB_VIDEO_BACKEND}
 
84
EOF
 
85
else
 
86
    # Insert all available backends; GRUB will use the most appropriate.
 
87
    for backend in $(cat "${GRUB_PREFIX}/video.lst"); do
 
88
        cat <<EOF
 
89
  insmod ${backend}
 
90
EOF
 
91
    done
 
92
fi
 
93
cat <<EOF
 
94
}
 
95
 
78
96
EOF
79
97
 
80
98
serial=0;
89
107
done
90
108
 
91
109
if [ "x$serial" = x1 ]; then
92
 
    if ! test -e ${grub_prefix}/serial.mod ; then
 
110
    if ! test -e ${GRUB_PREFIX}/serial.mod ; then
93
111
        echo "Serial terminal not available on this platform." >&2 ; exit 1
94
112
    fi
95
113
 
107
125
    cat << EOF
108
126
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
109
127
  set gfxmode=${GRUB_GFXMODE}
 
128
  load_video
110
129
  insmod gfxterm
111
 
  insmod ${GRUB_VIDEO_BACKEND}
112
130
EOF
113
131
    if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
114
132
        && is_path_readable_by_grub "$GRUB_THEME"; then
238
256
 
239
257
# Play an initial tune
240
258
if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
241
 
  cat << EOF
242
 
insmod play
243
 
play ${GRUB_INIT_TUNE}
244
 
EOF
 
259
  echo "play ${GRUB_INIT_TUNE}"
 
260
fi
 
261
 
 
262
if [ "x${GRUB_BADRAM}" != "x" ] ; then
 
263
  echo "badram ${GRUB_BADRAM}"
245
264
fi