|
|
18971c |
From 3186a0aa15822d69c8eb073bfc76665a1315957c Mon Sep 17 00:00:00 2001
|
|
|
18971c |
From: Thomas Renninger <trenn@suse.de>
|
|
|
18971c |
Date: Thu, 11 Dec 2014 15:46:33 +0100
|
|
|
18971c |
Subject: [PATCH] dracut: nbd: Only complain of missing binary in hostonly mode
|
|
|
18971c |
if
|
|
|
18971c |
|
|
|
18971c |
rootfs is on nbd
|
|
|
18971c |
|
|
|
18971c |
In not hostonly mode, require_binaries will still complain.
|
|
|
18971c |
If in hostonly mode and the module is explicitly added via -a nbd, then
|
|
|
18971c |
install() section will still complain later:
|
|
|
18971c |
dracut-install: ERROR: installing 'nbd-client'
|
|
|
18971c |
|
|
|
18971c |
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
|
18971c |
(cherry picked from commit e683985d103f1b0f15a9ccd9678169f4fb7aeb5f)
|
|
|
18971c |
---
|
|
|
18971c |
modules.d/95nbd/module-setup.sh | 3 +--
|
|
|
18971c |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
18971c |
|
|
|
18971c |
diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh
|
|
|
18971c |
index 7e8a416c..270a9d31 100755
|
|
|
18971c |
--- a/modules.d/95nbd/module-setup.sh
|
|
|
18971c |
+++ b/modules.d/95nbd/module-setup.sh
|
|
|
18971c |
@@ -4,8 +4,6 @@
|
|
|
18971c |
|
|
|
18971c |
check() {
|
|
|
18971c |
local _rootdev
|
|
|
18971c |
- # If our prerequisites are not met, fail.
|
|
|
18971c |
- require_binaries nbd-client || return 1
|
|
|
18971c |
|
|
|
18971c |
# if an nbd device is not somewhere in the chain of devices root is
|
|
|
18971c |
# mounted on, fail the hostonly check.
|
|
|
18971c |
@@ -16,6 +14,7 @@ check() {
|
|
|
18971c |
[[ -b /dev/block/$_rootdev ]] || return 1
|
|
|
18971c |
check_block_and_slaves is_nbd "$_rootdev" || return 255
|
|
|
18971c |
}
|
|
|
18971c |
+ require_binaries nbd-client || return 1
|
|
|
18971c |
|
|
|
18971c |
return 0
|
|
|
18971c |
}
|