Line 0
Link Here
|
|
|
1 |
#! /bin/sh -e |
2 |
|
3 |
prefix=@prefix@ |
4 |
exec_prefix=@exec_prefix@ |
5 |
bindir=@bindir@ |
6 |
libdir=@libdir@ |
7 |
datadir=@datadir@ |
8 |
. ${datadir}/grub/grub-mkconfig_lib |
9 |
|
10 |
# check for usable backgrounds |
11 |
use_bg=false |
12 |
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] && [ "x$GRUB_WALLPAPER" != "x" ]; then |
13 |
for i in ${datadir}/grub/`basename $GRUB_WALLPAPER` $GRUB_WALLPAPER ; do |
14 |
if is_path_readable_by_grub $i ; then |
15 |
bg=$i |
16 |
case ${bg} in |
17 |
*.png) reader=png ;; |
18 |
*.tga) reader=tga ;; |
19 |
*.jpg|*.jpeg) reader=jpeg ;; |
20 |
esac |
21 |
if test -e ${libdir}/grub/i386-pc/${reader}.mod ; then |
22 |
echo "Found background image: `basename ${bg}`" >&2 |
23 |
use_bg=true |
24 |
break |
25 |
fi |
26 |
fi |
27 |
done |
28 |
fi |
29 |
|
30 |
# set the background if possible |
31 |
if ${use_bg} ; then |
32 |
prepare_grub_to_access_device `${grub_probe} --target=device ${bg}` |
33 |
cat << EOF |
34 |
insmod ${reader} |
35 |
EOF |
36 |
fi |
37 |
|
38 |
GRUB_COLOR_NORMAL=${GRUB_COLOR_NORMAL:=white/black} |
39 |
GRUB_COLOR_HIGHLIGHT=${GRUB_COLOR_HIGHLIGHT:=black/light-gray} |
40 |
|
41 |
cat << EOF |
42 |
set color_normal=$GRUB_COLOR_NORMAL |
43 |
set color_highlight=$GRUB_COLOR_HIGHLIGHT |
44 |
EOF |