#!/bin/bash [ -z "$DESTDIR" ] || exit 0 set -e [ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec" [ -z "$DATADIR" ] && DATADIR="/usr/share" [ -z "$SYSTEMMAP" ] && SYSTEM_MAP="/boot/System.map-$(/bin/uname -r)" [ -z "$LIB" ] && $(echo nash-showelfinterp /usr/bin/plymouth | /sbin/nash --forcequiet | grep -q lib64) && LIB="lib64" || LIB="lib" [ -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="@logofile@" if [ -f "${LIBEXECDIR}/initrd-functions" ]; then . "${LIBEXECDIR}/initrd-functions" else echo "Couldn't import initrd functions." > /dev/stderr exit 1 fi 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 set_verbose $verbose [ -z "$INITRDDIR" ] && usage error inst ${LIBEXECDIR}/plymouth/plymouthd $INITRDDIR /bin/plymouthd inst ${BINDIR}/plymouth $INITRDDIR inst ${LIBDIR}/plymouth/text.so $INITRDDIR inst ${LIBDIR}/plymouth/details.so $INITRDDIR inst ${PLYMOUTH_LOGO_FILE} $INITRDDIR mkdir -p ${INITRDDIR}${DATADIR}/plymouth PLUGIN_NAME=$(plymouth-set-default-plugin) if [ -z "$PLUGIN_NAME" ]; then echo "No default plymouth plugin is set" > /dev/stderr exit 1 fi if [ ! -f ${LIBDIR}/plymouth/${PLUGIN_NAME}.so ]; then echo "The default plymouth plugin (${PLUGIN_NAME}) doesn't exist" > /dev/stderr exit 1 fi inst ${LIBDIR}/plymouth/${PLUGIN_NAME}.so $INITRDDIR inst ${LIBDIR}/plymouth/default.so $INITRDDIR if [ -d ${DATADIR}/plymouth/${PLUGIN_NAME} ]; then for x in ${DATADIR}/plymouth/${PLUGIN_NAME}/* ; do [ ! -f "$x" ] && break inst $x $INITRDDIR done fi # vim:ts=8:sw=4:sts=4:et