summaryrefslogtreecommitdiff
path: root/scripts/plymouth-set-default-theme.in
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2009-11-03 23:31:51 -0500
committerRay Strode <rstrode@redhat.com>2009-11-03 23:31:51 -0500
commit8e70c530ea2937ac5a621e7974e35554108f2e2b (patch)
treef3a418778a720aeed87e8e28576442f06aaf449d /scripts/plymouth-set-default-theme.in
parent5b53999611604fb575519f87c8369c8cb351aa26 (diff)
[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)
Diffstat (limited to 'scripts/plymouth-set-default-theme.in')
-rwxr-xr-xscripts/plymouth-set-default-theme.in19
1 files 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