Commit 7d631a48 authored by Anton Midyukov's avatar Anton Midyukov

build-vm: add 20-grub-terminal script for setup terminal_output

By default, GRUB_TERMINAL_OUTPUT='gfxterm' is configured. This creates problems for virtual machines and single-board computers, since they need output to console.
parent 99bb9853
#!/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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment