aboutsummaryrefslogtreecommitdiff
path: root/distro
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2024-03-07 21:48:46 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2024-03-07 21:48:46 -0500
commit31693c2549df08784dd28e41c7efbe9426be2378 (patch)
treeb78f439130ed554ecc6b3cbd9b1352e93dc0d07d /distro
parentb7d49e4dbc4672dd6c35bc487026f2fa0ebbc21b (diff)
downloaddotfiles-31693c2549df08784dd28e41c7efbe9426be2378.tar.gz
dotfiles-31693c2549df08784dd28e41c7efbe9426be2378.tar.xz
Add a section to enable/disable plymouth on Fedora.
Diffstat (limited to 'distro')
-rwxr-xr-xdistro/fedora.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/distro/fedora.sh b/distro/fedora.sh
index 34c7040..95c4de0 100755
--- a/distro/fedora.sh
+++ b/distro/fedora.sh
@@ -4,6 +4,7 @@ if [ "$(id -u)" -ne 0 ] ; then
exit 1
fi
set -ex
+PLYMOUTH=0
yum -y update
@@ -89,6 +90,7 @@ yum -y install \
sipcalc \
wireguard-tools \
mpd \
+ vlc \
# https://rpmfusion.org/Configuration
@@ -140,3 +142,41 @@ dnf -y install dnf-plugins-core
dnf -y config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
dnf -y install brave-browser
+
+plymouth_changed=0
+case $PLYMOUTH in
+on|yes|1)
+ fn="/etc/default/grub"
+ bak="$fn.$(date +%s)"
+ cp "$fn" "$bak"
+ if grep -q '^GRUB_CMDLINE_LINUX=.*rhgb quiet' "$fn"; then
+ plymouth_changed=1
+
+ sed -i -re's/^(GRUB_CMDLINE_LINUX=.*)rhgb quiet/\1/g' "$fn"
+ if diff -q "$fn" "$bak" >/dev/null ; then
+ rm "$bak"
+ fi
+ fi
+
+ echo 'omit_dracutmodules+=" plymouth "' > /etc/dracut.conf.d/01-no-plymouth.conf
+;;
+off|no|0)
+ fn="/etc/default/grub"
+ bak="$fn.$(date +%s)"
+ cp "$fn" "$bak"
+ if ! grep -q '^GRUB_CMDLINE_LINUX=.*rhgb quiet' "$fn"; then
+ plymouth_changed=1
+
+ sed -i -re's/^(GRUB_CMDLINE_LINUX=.*)"/\1 rhgb quiet"/g' "$fn"
+ if diff -q "$fn" "$bak" >/dev/null ; then
+ rm "$bak"
+ fi
+ fi
+
+ rm /etc/dracut.conf.d/01-no-plymouth.conf || true
+;;
+esac
+if [ $plymouth_changed -eq 1 ] ; then
+ dracut -v -f
+ grub2-mkconfig -o /boot/grub2/grub.cfg
+fi