Add a script for making grub verbose

This commit is contained in:
Manuel Thalmann 2024-04-12 08:33:16 +02:00
parent 1a64e0a3ca
commit 3e3bcc1f4f

View file

@ -0,0 +1,8 @@
#!/bin/bash
configFile=/etc/default/grub;
pattern="^\\(GRUB_CMDLINE_LINUX_DEFAULT=\".*\\)\\([[:space:]]quiet\\|quiet[[:space:]]\\)\\(.*\".*\\)$";
if grep "$pattern" "$configFile" > /dev/null
then
sudo sed -i "/$pattern/{ h; s/^\\(.*\\)$/#\\1/; p; x; s/$pattern/\\1\\3/; };" "$configFile";
fi;