Harald Hoyer d88ded
From 96d69bbf34901e054d5f06f14224ae5094804103 Mon Sep 17 00:00:00 2001
Harald Hoyer d88ded
From: Harald Hoyer <harald@hoyer.xyz>
Harald Hoyer d88ded
Date: Fri, 1 Dec 2017 09:13:53 +0100
Harald Hoyer d88ded
Subject: [PATCH] Merge pull request #309 from danimo/multipath_bin_error
Harald Hoyer d88ded
Harald Hoyer d88ded
Fix warning about multipath if not needed
Harald Hoyer d88ded
---
Harald Hoyer d88ded
 modules.d/90multipath/module-setup.sh | 5 +++--
Harald Hoyer d88ded
 1 file changed, 3 insertions(+), 2 deletions(-)
Harald Hoyer d88ded
Harald Hoyer d88ded
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
Harald Hoyer d88ded
index 28857ebc..0a680b17 100755
Harald Hoyer d88ded
--- a/modules.d/90multipath/module-setup.sh
Harald Hoyer d88ded
+++ b/modules.d/90multipath/module-setup.sh
Harald Hoyer d88ded
@@ -10,13 +10,14 @@ is_mpath() {
Harald Hoyer d88ded
 # called by dracut
Harald Hoyer d88ded
 check() {
Harald Hoyer d88ded
     local _rootdev
Harald Hoyer d88ded
-    # if there's no multipath binary, no go.
Harald Hoyer d88ded
-    require_binaries multipath || return 1
Harald Hoyer d88ded
 
Harald Hoyer d88ded
     [[ $hostonly ]] || [[ $mount_needs ]] && {
Harald Hoyer d88ded
         for_each_host_dev_and_slaves is_mpath || return 255
Harald Hoyer d88ded
     }
Harald Hoyer d88ded
 
Harald Hoyer d88ded
+    # if there's no multipath binary, no go.
Harald Hoyer d88ded
+    require_binaries multipath || return 1
Harald Hoyer d88ded
+
Harald Hoyer d88ded
     return 0
Harald Hoyer d88ded
 }
Harald Hoyer d88ded
 
Harald Hoyer d88ded