From: Jeremy Katz Date: Mon, 10 Nov 2008 16:16:24 +0000 (-0500) Subject: Make populate-initrd default plugin tweakable X-Git-Tag: 0.6.0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=218064c122d607faba8f4e4d5c327b02998c5d39;p=thirdparty%2Fplymouth.git Make populate-initrd default plugin tweakable It's occasionally useful to be able to specify the which plugin to use with plymouth-populate-initrd. --- diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in index e9db1b93..cc640e5f 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