Harald Hoyer 460d2c
From 05ce5c41b61f97d41044f2f146de980e38f7991a Mon Sep 17 00:00:00 2001
Harald Hoyer 460d2c
From: q66 <daniel@octaforge.org>
Harald Hoyer 460d2c
Date: Sat, 25 Jul 2020 17:47:00 +0200
Harald Hoyer 460d2c
Subject: [PATCH] 90ppcmac: respect DRACUT_ARCH, don't exclude ppcle
Harald Hoyer 460d2c
Harald Hoyer 460d2c
---
Harald Hoyer 460d2c
 modules.d/90ppcmac/module-setup.sh | 6 +++---
Harald Hoyer 460d2c
 1 file changed, 3 insertions(+), 3 deletions(-)
Harald Hoyer 460d2c
Harald Hoyer 460d2c
diff --git a/modules.d/90ppcmac/module-setup.sh b/modules.d/90ppcmac/module-setup.sh
Harald Hoyer 460d2c
index 59221ec4..d457119f 100644
Harald Hoyer 460d2c
--- a/modules.d/90ppcmac/module-setup.sh
Harald Hoyer 460d2c
+++ b/modules.d/90ppcmac/module-setup.sh
Harald Hoyer 460d2c
@@ -17,9 +17,9 @@
Harald Hoyer 460d2c
 
Harald Hoyer 460d2c
 # called by dracut
Harald Hoyer 460d2c
 check() {
Harald Hoyer 460d2c
-    local _arch="$(uname -m)"
Harald Hoyer 460d2c
+    local _arch=${DRACUT_ARCH:-$(uname -m)}
Harald Hoyer 460d2c
     # only for PowerPC Macs
Harald Hoyer 460d2c
-    [[ "$_arch" == ppc* && "$_arch" != ppc*le ]] || return 1
Harald Hoyer 460d2c
+    [[ "$_arch" == ppc* && "$_arch" != ppc64le ]] || return 1
Harald Hoyer 460d2c
     return 0
Harald Hoyer 460d2c
 }
Harald Hoyer 460d2c
 
Harald Hoyer 460d2c
@@ -36,7 +36,7 @@ installkernel() {
Harald Hoyer 460d2c
     }
Harald Hoyer 460d2c
 
Harald Hoyer 460d2c
     # only PowerMac3,6 has a module, special case
Harald Hoyer 460d2c
-    if [[ "$(uname -m)" == ppc ]]; then
Harald Hoyer 460d2c
+    if [[ "${DRACUT_ARCH:-$(uname -m)}" != ppc64* ]]; then
Harald Hoyer 460d2c
         if ! [[ $hostonly ]] || [[ "$(pmac_model)" == "PowerMac3,6" ]]; then
Harald Hoyer 460d2c
             instmods therm_windtunnel
Harald Hoyer 460d2c
         fi
Harald Hoyer 460d2c