mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-11-05 12:36:13 +01:00
More robust detection of GRUB_TERMINAL=console, autocomment GRUB_TERMINAL_OUTPUT=console
This commit is contained in:
parent
70152af6d2
commit
a32502f6ed
@ -189,9 +189,14 @@ install() {
|
||||
echo "${gfxmode}" >> /etc/default/grub
|
||||
fi
|
||||
|
||||
if grep "GRUB_TERMINAL=console" /etc/default/grub 2>&1 >/dev/null; then
|
||||
if grep "GRUB_TERMINAL=console" /etc/default/grub 2>&1 >/dev/null || grep "GRUB_TERMINAL=\"console\"" /etc/default/grub 2>&1 >/dev/null; then
|
||||
#Replace GRUB_TERMINAL
|
||||
sed -i "s|.*GRUB_TERMINAL=console.*|#GRUB_TERMINAL=console|" /etc/default/grub
|
||||
sed -i "s|.*GRUB_TERMINAL=.*|#GRUB_TERMINAL=console|" /etc/default/grub
|
||||
fi
|
||||
|
||||
if grep "GRUB_TERMINAL_OUTPUT=console" /etc/default/grub 2>&1 >/dev/null || grep "GRUB_TERMINAL_OUTPUT=\"console\"" /etc/default/grub 2>&1 >/dev/null; then
|
||||
#Replace GRUB_TERMINAL_OUTPUT
|
||||
sed -i "s|.*GRUB_TERMINAL_OUTPUT=.*|#GRUB_TERMINAL_OUTPUT=console|" /etc/default/grub
|
||||
fi
|
||||
|
||||
# Update grub config
|
||||
|
Loading…
Reference in New Issue
Block a user