PortValhalla/scripts/Common/Config/GRUB/verbose.sh

10 lines
345 B
Bash
Raw Normal View History

2024-04-12 06:33:16 +00:00
#!/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";
sudo grub-mkconfig -o /boot/grub/grub.cfg;
2024-04-12 06:33:16 +00:00
fi;