From 8e70c530ea2937ac5a621e7974e35554108f2e2b Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 3 Nov 2009 23:31:51 -0500 Subject: [set-default-theme] Drop nash dependency Now we require one of 1) /bin/plymouth being installed 2) PLYMOUTH_PLUGIN_PATH being set 3) LIB being set (for compatibility) --- scripts/plymouth-set-default-theme.in | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/plymouth-set-default-theme.in b/scripts/plymouth-set-default-theme.in index 9ca9f35f..fa43901c 100755 --- a/scripts/plymouth-set-default-theme.in +++ b/scripts/plymouth-set-default-theme.in @@ -4,15 +4,14 @@ set -e [ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec" [ -z "$DATADIR" ] && DATADIR="/usr/share" -if [ -z "$LIB" ]; then - if $(echo nash-showelfinterp /proc/$$/exe | /sbin/nash --forcequiet | grep -q lib64); then - LIB="lib64" - else - LIB="lib" - fi +if [ -z "$PLYMOUTH_PLUGIN_PATH" ]; then + if [ -z "$LIB" ]; then + PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)" + else + [ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB" + PLYMOUTH_PLUGIN_PATH=${LIBDIR}/plymouth/ + fi fi -[ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB" -[ -z "$BINDIR" ] && BINDIR="/usr/bin" function usage () { @@ -135,8 +134,8 @@ fi MODULE_NAME=$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth | sed 's/ModuleName *= *//') -if [ ! -e ${LIBDIR}/plymouth/${MODULE_NAME}.so ]; then - echo "${LIBDIR}/plymouth/${MODULE_NAME}.so does not exist" > /dev/stderr +if [ ! -e ${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so ]; then + echo "${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so does not exist" > /dev/stderr exit 1 fi -- cgit v1.2.3