From e4e24c1e841f91987561c1970148872214bbaaf8 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 1 Jul 2014 13:54:04 +0200 Subject: dracut: nbd: Only complain of missing binary in hostonly mode if 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 --- modules.d/95nbd/module-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh index e62f290..dc5102e 100755 --- a/modules.d/95nbd/module-setup.sh +++ b/modules.d/95nbd/module-setup.sh @@ -5,8 +5,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. @@ -17,6 +15,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 } -- 1.8.4.5