Add a script for making grub verbose

This commit is contained in:
Manuel Thalmann 2024-04-12 08:33:16 +02:00
parent fdd30400a3
commit fe7b5e4545

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;