From: Victor Lowther Date: Fri, 6 Mar 2009 22:30:17 +0000 (-0600) Subject: Chop tons of unneeded stuff out of the plymouth module X-Git-Tag: 0.1~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=321763882c47481d6edaa5dd20d213c3c50b42d2;p=thirdparty%2Fdracut.git Chop tons of unneeded stuff out of the plymouth module Most of plymouth-populate-initrd appears to have been unneeded, and is gone. The rest was updated to match dracut usage. --- diff --git a/modules.d/50plymouth/install b/modules.d/50plymouth/install index 2cb53bae9..e05f48f3b 100755 --- a/modules.d/50plymouth/install +++ b/modules.d/50plymouth/install @@ -1,6 +1,6 @@ #!/bin/bash echo "installing plymouth" -. "$moddir"/plymouth-populate-initrd -t "$initdir" +. "$moddir"/plymouth-populate-initrd inst_hook pre-udev 10 "$moddir"/plymouth-start.sh inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh inst_hook mount 10 "$moddir/cryptroot.sh" diff --git a/modules.d/50plymouth/plymouth-populate-initrd b/modules.d/50plymouth/plymouth-populate-initrd index 930da3cf9..e195ddc9c 100755 --- a/modules.d/50plymouth/plymouth-populate-initrd +++ b/modules.d/50plymouth/plymouth-populate-initrd @@ -1,87 +1,24 @@ #!/bin/bash - -[ -z "$DESTDIR" ] || exit 0 - -[ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec" -[ -z "$DATADIR" ] && DATADIR="/usr/share" -[ -z "$SYSTEMMAP" ] && SYSTEM_MAP="/boot/System.map-$(/bin/uname -r)" -if [ -z "$LIB" ]; then - if $(echo nash-showelfinterp /proc/$$/exe | /sbin/nash --forcequiet | grep -q lib64); then - LIB="lib64" - else - LIB="lib" - fi -fi -[ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB" -[ -z "$BINDIR" ] && BINDIR="/usr/bin" -[ -z "$GRUB_MENU_TITLE" ] && GRUB_MENU_TITLE="Graphical Bootup" -[ -z "$PLYMOUTH_LOGO_FILE" ] && PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png" -[ -z "$PLYMOUTH_PLUGIN_NAME" ] && PLYMOUTH_PLUGIN_NAME=$(plymouth-set-default-plugin) - -function usage() { - local output="/dev/stdout" - local rc=0 - if [ "$1" == "error" ]; then - output="/dev/stderr" - rc=1 - fi - - echo "usage: plymouth [ --verbose | -v ] { --targetdir | -t } " > $output - exit $rc -} - -verbose=false -INITRDDIR="" -while [ $# -gt 0 ]; do - case $1 in - --verbose|-v) - verbose=true - ;; - --targetdir|-t) - shift - INITRDDIR="$1" - ;; - --help|-h) - usage normal - ;; - *) - usage error - break - ;; - esac - shift -done - -[ -z "$INITRDDIR" ] && usage error - -inst /sbin/plymouthd $INITRDDIR /bin/plymouthd -inst /bin/plymouth $INITRDDIR -inst ${LIBDIR}/plymouth/text.so $INITRDDIR -inst ${LIBDIR}/plymouth/details.so $INITRDDIR -inst ${PLYMOUTH_LOGO_FILE} $INITRDDIR -inst /etc/system-release $INITRDDIR -mkdir -p ${INITRDDIR}${DATADIR}/plymouth - -if [ -z "$PLYMOUTH_PLUGIN_NAME" ]; then - echo "No default plymouth plugin is set" > /dev/stderr - exit 1 +if ldd /proc/$$/exe |grep -q lib64; then + LIBDIR="/usr/lib64" +else + LIBDIR="/usr/lib" fi +PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png" +PLYMOUTH_PLUGIN_NAME=$(plymouth-set-default-plugin) -if [ ! -f ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}.so ]; then - echo "The default plymouth plugin (${PLYMOUTH_PLUGIN_NAME}) doesn't exist" > /dev/stderr - exit 1 -fi - -inst ${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}.so $INITRDDIR +inst /sbin/plymouthd /bin/plymouthd +dracut_install /bin/plymouth "${LIBDIR}/plymouth/text.so" \ + "${LIBDIR}/plymouth/details.so" "${PLYMOUTH_LOGO_FILE}" \ + /etc/system-release "${LIBDIR}/plymouth/${PLYMOUTH_PLUGIN_NAME:=text}.so" +mkdir -p "${initdir}/usr/share/plymouth" -if [ -f ${LIBDIR}/plymouth/default.so ]; then - inst ${LIBDIR}/plymouth/default.so $INITRDDIR -fi +[[ -f ${LIBDIR}/plymouth/default.so ]] && inst ${LIBDIR}/plymouth/default.so -if [ -d ${DATADIR}/plymouth/${PLYMOUTH_PLUGIN_NAME} ]; then - for x in ${DATADIR}/plymouth/${PLYMOUTH_PLUGIN_NAME}/* ; do - [ ! -f "$x" ] && break - inst $x $INITRDDIR +if [[ -d /usr/share/plymouth/${PLYMOUTH_PLUGIN_NAME} ]]; then + for x in "/usr/share/plymouth/${PLYMOUTH_PLUGIN_NAME}"/* ; do + [[ -f "$x" ]] || break + inst $x done fi