diff options
author | Ray Strode <rstrode@redhat.com> | 2009-11-03 23:31:51 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2009-11-03 23:31:51 -0500 |
commit | 8e70c530ea2937ac5a621e7974e35554108f2e2b (patch) | |
tree | f3a418778a720aeed87e8e28576442f06aaf449d /scripts/plymouth-set-default-theme.in | |
parent | 5b53999611604fb575519f87c8369c8cb351aa26 (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-x | scripts/plymouth-set-default-theme.in | 19 |
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 |