]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: nbd: Only complain of missing binary in hostonly mode if
authorThomas Renninger <trenn@suse.de>
Thu, 11 Dec 2014 14:46:33 +0000 (15:46 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Dec 2014 12:29:37 +0000 (13:29 +0100)
 rootfs is on nbd

In not hostonly mode, require_binaries will still complain.
If in hostonly mode and the module is explicitly added via -a nbd, then
install() section will still complain later:
dracut-install: ERROR: installing 'nbd-client'

Signed-off-by: Thomas Renninger <trenn@suse.de>
modules.d/95nbd/module-setup.sh

index 4f9e3508f26dcebd8ac748a7df0c13278ac8c69c..3cb6f496399857728bbdacf28ca9b44663c63a93 100755 (executable)
@@ -3,8 +3,6 @@
 # called by dracut
 check() {
     local _rootdev
-    # If our prerequisites are not met, fail.
-    require_binaries nbd-client || return 1
 
     # if an nbd device is not somewhere in the chain of devices root is
     # mounted on, fail the hostonly check.
@@ -15,6 +13,7 @@ check() {
         [[ -b /dev/block/$_rootdev ]] || return 1
         check_block_and_slaves is_nbd "$_rootdev" || return 255
     }
+    require_binaries nbd-client || return 1
 
     return 0
 }