summaryrefslogtreecommitdiff
authorRay Strode <rstrode@redhat.com>2009-11-04 04:31:51 (GMT)
committer Ray Strode <rstrode@redhat.com>2009-11-04 04:31:51 (GMT)
commit8e70c530ea2937ac5a621e7974e35554108f2e2b (patch) (side-by-side diff)
treef3a418778a720aeed87e8e28576442f06aaf449d
parent5b53999611604fb575519f87c8369c8cb351aa26 (diff)
downloadplymouth-8e70c530ea2937ac5a621e7974e35554108f2e2b.zip
plymouth-8e70c530ea2937ac5a621e7974e35554108f2e2b.tar.gz
[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 (more/less context) (ignore whitespace changes)
-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 9ca9f35..fa43901 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