From: Hans de Goede Date: Wed, 9 Jan 2019 13:38:26 +0000 (+0100) Subject: plymouth-populate-initrd: Don't assume the ImageDir is the theme-dir X-Git-Tag: 0.9.5~77^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6117fe683ba704041404ee3462faf0f768e2f396;p=thirdparty%2Fplymouth.git plymouth-populate-initrd: Don't assume the ImageDir is the theme-dir Before this commit plymouth-populate-initrd was only recursively copying the /usr/share/plymouth/themes/$PLYMOUTH_THEME_NAME to the initrd, assuming that ImageDir will point there. This makes it impossible for 2 themes to share their ImageDir, which is desirable for example for the spinner and bgrt themes, which use the same images with slightly different settings. This commit also makes plymouth-populate-initrd also copy the ImageDir if it is different from the theme-dir, making it possible for ImageDir to point to a different dir. Signed-off-by: Hans de Goede --- diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in index c2f46c0f..109b649e 100755 --- a/scripts/plymouth-populate-initrd.in +++ b/scripts/plymouth-populate-initrd.in @@ -412,6 +412,8 @@ if [ $THEME_OVERRIDE ]; then fi PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//') +PLYMOUTH_THEME_DIR="${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}" +PLYMOUTH_IMAGE_DIR=$(grep "ImageDir *= *" ${PLYMOUTH_THEME_DIR}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ImageDir *= *//') if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" >&2 @@ -423,8 +425,12 @@ inst ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so $INITRDDIR [ -f "${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so" ] && inst ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so $INITRDDIR inst ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so $INITRDDIR -if [ -d ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then - inst_recur "${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}" +if [ -d "${PLYMOUTH_THEME_DIR}" ]; then + inst_recur "${PLYMOUTH_THEME_DIR}" +fi + +if [ "${PLYMOUTH_IMAGE_DIR}" != "${PLYMOUTH_THEME_DIR}" -a -d "${PLYMOUTH_IMAGE_DIR}" ]; then + inst_recur "${PLYMOUTH_IMAGE_DIR}" fi if [ -L ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ]; then