]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Chop tons of unneeded stuff out of the plymouth module
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 22:30:17 +0000 (16:30 -0600)
committerVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 22:30:17 +0000 (16:30 -0600)
Most of plymouth-populate-initrd appears to have been unneeded, and is gone.
The rest was updated to match dracut usage.

modules.d/50plymouth/install
modules.d/50plymouth/plymouth-populate-initrd

index 2cb53bae932ea8b4cadd91669f32fe57347c5500..e05f48f3b0f02e54029867e069b1a551e1655de3 100755 (executable)
@@ -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"
index 930da3cf9c8186e4374fcf88919a08e951ea3352..e195ddc9c9e7b682a485d5118f04cde0d358ce68 100755 (executable)
@@ -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 } <initrd_directory>" > $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