Blame 0004-plymouth-also-find-the-pkglibdir-on-debian.patch

Harald Hoyer e09d6b
From 4adeefc4abb8fb1d83e483d12da6b337c486fded Mon Sep 17 00:00:00 2001
Harald Hoyer e09d6b
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer e09d6b
Date: Tue, 8 Jul 2014 11:50:51 +0200
Harald Hoyer e09d6b
Subject: [PATCH] plymouth: also find the pkglibdir on debian
Harald Hoyer e09d6b
Harald Hoyer e09d6b
---
Harald Hoyer e09d6b
 modules.d/50plymouth/module-setup.sh | 12 +++++++++---
Harald Hoyer e09d6b
 1 file changed, 9 insertions(+), 3 deletions(-)
Harald Hoyer e09d6b
Harald Hoyer e09d6b
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
Harald Hoyer e09d6b
index b818324..33fab11 100755
Harald Hoyer e09d6b
--- a/modules.d/50plymouth/module-setup.sh
Harald Hoyer e09d6b
+++ b/modules.d/50plymouth/module-setup.sh
Harald Hoyer e09d6b
@@ -15,12 +15,18 @@ depends() {
Harald Hoyer e09d6b
 
Harald Hoyer e09d6b
 # called by dracut
Harald Hoyer e09d6b
 install() {
Harald Hoyer e09d6b
-    if grep -q nash /usr/libexec/plymouth/plymouth-populate-initrd \
Harald Hoyer e09d6b
-        || [ ! -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
Harald Hoyer e09d6b
+    PKGLIBDIR="/usr/lib/plymouth"
Harald Hoyer e09d6b
+    if type -P dpkg-architecture &>/dev/null; then
Harald Hoyer e09d6b
+        PKGLIBDIR="/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth"
Harald Hoyer e09d6b
+    fi
Harald Hoyer e09d6b
+    [ -x /usr/libexec/plymouth/plymouth-populate-initrd ] && PKGLIBDIR="/usr/libexec/plymouth"
Harald Hoyer e09d6b
+
Harald Hoyer e09d6b
+    if grep -q nash ${PKGLIBDIR}/plymouth-populate-initrd \
Harald Hoyer e09d6b
+        || [ ! -x ${PKGLIBDIR}/plymouth-populate-initrd ]; then
Harald Hoyer e09d6b
         . "$moddir"/plymouth-populate-initrd.sh
Harald Hoyer e09d6b
     else
Harald Hoyer e09d6b
         PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \
Harald Hoyer e09d6b
-            /usr/libexec/plymouth/plymouth-populate-initrd -t "$initdir"
Harald Hoyer e09d6b
+            ${PKGLIBDIR}/plymouth-populate-initrd -t "$initdir"
Harald Hoyer e09d6b
     fi
Harald Hoyer e09d6b
 
Harald Hoyer e09d6b
     inst_hook emergency 50 "$moddir"/plymouth-emergency.sh