7d631a48cd
By default, GRUB_TERMINAL_OUTPUT='gfxterm' is configured. This creates problems for virtual machines and single-board computers, since they need output to console.
15 lines
333 B
Bash
Executable File
15 lines
333 B
Bash
Executable File
#!/bin/sh -efu
|
|
|
|
GRUB_CFG=/etc/sysconfig/grub2
|
|
|
|
[ -s "$GRUB_CFG" ] || exit 0
|
|
|
|
GRUBTHEME="$(cat "$GRUB_CFG" |grep '^GRUB_THEME=.*' |tail -n 1)"
|
|
GRUBTHEME="${GRUBTHEME%/*}"
|
|
GRUBTHEME="${GRUBTHEME##*/}"
|
|
|
|
[ -z "$GRUBTHEME" ] || exit 0
|
|
|
|
sed '/^GRUB_TERMINAL_OUTPUT=.*/d' -i "$GRUB_CFG"
|
|
echo 'GRUB_TERMINAL_OUTPUT="console"' >> "$GRUB_CFG"
|