1
0
forked from rpms/plymouth
plymouth/plymouth-allow-passing-plugin.patch
Jeremy Katz 94baba13d3 - Allow pre-setting the default plugin when calling
plymouth-populate-initrd
2008-11-03 19:31:27 +00:00

42 lines
1.6 KiB
Diff

diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in
index e9db1b9..cc640e5 100755
--- a/scripts/plymouth-populate-initrd.in
+++ b/scripts/plymouth-populate-initrd.in
@@ -10,6 +10,7 @@
[ -z "$BINDIR" ] && BINDIR="/usr/bin"
[ -z "$GRUB_MENU_TITLE" ] && GRUB_MENU_TITLE="Graphical Bootup"
[ -z "$PLYMOUTH_LOGO_FILE" ] && PLYMOUTH_LOGO_FILE="@logofile@"
+[ -z "$PLYMOUTH_PLUGIN_NAME" ] && PLYMOUTH_PLUGIN_NAME=$(plymouth-set-default-plugin)
if [ -f "${LIBEXECDIR}/initrd-functions" ]; then
. "${LIBEXECDIR}/initrd-functions"
@@ -63,22 +64,20 @@ inst ${PLYMOUTH_LOGO_FILE} $INITRDDIR
inst /etc/system-release $INITRDDIR
mkdir -p ${INITRDDIR}${DATADIR}/plymouth
-PLUGIN_NAME=$(plymouth-set-default-plugin)
-
-if [ -z "$PLUGIN_NAME" ]; then
+if [ -z "$PLYMOUTH_PLUGIN_NAME" ]; then
echo "No default plymouth plugin is set" > /dev/stderr
exit 1
fi
-if [ ! -f ${LIBDIR}/plymouth/${PLUGIN_NAME}.so ]; then
- echo "The default plymouth plugin (${PLUGIN_NAME}) doesn't exist" > /dev/stderr
+if [ ! -f ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}.so ]; then
+ echo "The default plymouth plugin (${PLYMOUTH_PLUGIN_NAME}) doesn't exist" > /dev/stderr
exit 1
fi
-inst ${LIBDIR}/plymouth/${PLUGIN_NAME}.so $INITRDDIR
+inst ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}.so $INITRDDIR
inst ${LIBDIR}/plymouth/default.so $INITRDDIR
-if [ -d ${DATADIR}/plymouth/${PLUGIN_NAME} ]; then
- for x in ${DATADIR}/plymouth/${PLUGIN_NAME}/* ; do
+if [ -d ${DATADIR}/plymouth/${PLYMOUTH_PLUGIN_NAME} ]; then
+ for x in ${DATADIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}/* ; do
[ ! -f "$x" ] && break
inst $x $INITRDDIR
done