]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
90ppcmac: respect DRACUT_ARCH, don't exclude ppcle
authorq66 <daniel@octaforge.org>
Sat, 25 Jul 2020 15:47:00 +0000 (17:47 +0200)
committerDaniel Molkentin <daniel@molkentin.de>
Mon, 3 Aug 2020 14:47:51 +0000 (16:47 +0200)
modules.d/90ppcmac/module-setup.sh

index 59221ec4d34e15c29cc167f532c4a6d983372c5c..d457119f2844e5472d6a91e0f97c0fc70ec3b02b 100644 (file)
@@ -17,9 +17,9 @@
 
 # called by dracut
 check() {
-    local _arch="$(uname -m)"
+    local _arch=${DRACUT_ARCH:-$(uname -m)}
     # only for PowerPC Macs
-    [[ "$_arch" == ppc* && "$_arch" != ppc*le ]] || return 1
+    [[ "$_arch" == ppc* && "$_arch" != ppc64le ]] || return 1
     return 0
 }
 
@@ -36,7 +36,7 @@ installkernel() {
     }
 
     # only PowerMac3,6 has a module, special case
-    if [[ "$(uname -m)" == ppc ]]; then
+    if [[ "${DRACUT_ARCH:-$(uname -m)}" != ppc64* ]]; then
         if ! [[ $hostonly ]] || [[ "$(pmac_model)" == "PowerMac3,6" ]]; then
             instmods therm_windtunnel
         fi