| author | Will Woods <wwoods@redhat.com> | 2012-11-29 15:25:03 (GMT) |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2012-11-29 22:14:44 (GMT) |
| commit | a9703fb6e3112bbf63ae0f1b0d4d1b5c55befd32 (patch) (side-by-side diff) | |
| tree | ca95744dfcf6247a69b3889ac56e3ba27d45ad05 | |
| parent | 0b73cc8c4191b0170fbcdf19438a29108bf17f62 (diff) | |
| download | plymouth-a9703fb6.zip plymouth-a9703fb6.tar.gz | |
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.
| -rwxr-xr-x | scripts/plymouth-populate-initrd.in | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
