1
0
forked from rpms/plymouth
plymouth/fix-fed-up.patch
2012-12-13 13:21:10 -05:00

46 lines
2.0 KiB
Diff

From a9703fb6e3112bbf63ae0f1b0d4d1b5c55befd32 Mon Sep 17 00:00:00 2001
From: Will Woods <wwoods@redhat.com>
Date: Thu, 29 Nov 2012 10:25:03 -0500
Subject: [PATCH] populate-initrd: If PLYMOUTH_THEME_NAME is set, write it
into plymouthd.conf
You can set PLYMOUTH_THEME_NAME when building initramfs to get a
different theme into initramfs, but this doesn't change the default
theme, so the resulting initramfs won't actually use the theme we
installed.
This patch makes plymouth-populate-initrd rewrite the 'Theme=XXX' line
in plymouthd.conf, so plymouth will use the theme we install.
---
scripts/plymouth-populate-initrd.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in
index 8d1eec0..d901a9b 100755
--- a/scripts/plymouth-populate-initrd.in
+++ b/scripts/plymouth-populate-initrd.in
@@ -8,6 +8,7 @@
[ -z "$PLYMOUTH_DATADIR" ] && PLYMOUTH_DATADIR="@PLYMOUTH_DATADIR@"
[ -z "$PLYMOUTH_PLUGIN_PATH" ] && PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
[ -z "$PLYMOUTH_LOGO_FILE" ] && PLYMOUTH_LOGO_FILE="@PLYMOUTH_LOGO_FILE@"
+[ -n "$PLYMOUTH_THEME_NAME" ] && THEME_OVERRIDE=1
[ -z "$PLYMOUTH_THEME_NAME" ] && PLYMOUTH_THEME_NAME=$(plymouth-set-default-theme)
[ -z "$PLYMOUTH_CONFDIR" ] && PLYMOUTH_CONFDIR="@PLYMOUTH_CONF_DIR@"
[ -z "$PLYMOUTH_POLICYDIR" ] && PLYMOUTH_POLICYDIR="@PLYMOUTH_POLICY_DIR@"
@@ -388,6 +389,12 @@ if [ -z "$PLYMOUTH_THEME_NAME" ]; then
exit 1
fi
+if [ $THEME_OVERRIDE ]; then
+ conf=$INITRDDIR/${PLYMOUTH_CONFDIR}/plymouthd.conf
+ echo "modifying plymouthd.conf: Theme=$PLYMOUTH_THEME_NAME" > /dev/stderr
+ sed -i "s/^ *Theme *=.*/# theme modified by plymouth-populate-initrd\nTheme=$PLYMOUTH_THEME_NAME/" $conf
+fi
+
PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
--
1.7.11.7