Adds plymouth action exception

This commit is contained in:
Michel Fedde 2025-05-13 13:00:55 +02:00
parent 27a036d236
commit 69aa3ae441

View file

@ -1,10 +1,27 @@
#!/bin/env sh #!/bin/env sh
PLYMOYTH_THEME="colorful_loop"
PLYMOYTH_CONFIG_PATH="/etc/plymouth/plymouthd.conf"
addApplications plymouth plymouth-theme-colorful-loop-git addApplications plymouth plymouth-theme-colorful-loop-git
plymouthNeedsSetup() {
if [[ ! -f $PLYMOYTH_CONFIG_PATH ]]; then
return 0
fi
if ! cat $PLYMOYTH_CONFIG_PATH | grep "Theme=${PLYMOYTH_THEME}"; then
return 0
fi
return 1
}
setupPlymouth() { setupPlymouth() {
sudo plymouth-set-default-theme colorful_loop sudo plymouth-set-default-theme ${PLYMOYTH_THEME}
sudo dracut --force --hostonly sudo dracut --force --hostonly
} }
addActions setupPlymouth if plymouthNeedsSetup; then
addActions setupPlymouth
fi