From: Thomas Renninger Date: Thu, 11 Dec 2014 14:46:33 +0000 (+0100) Subject: dracut: nbd: Only complain of missing binary in hostonly mode if X-Git-Tag: 033-502~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3186a0aa15822d69c8eb073bfc76665a1315957c;p=thirdparty%2Fdracut.git 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 (cherry picked from commit e683985d103f1b0f15a9ccd9678169f4fb7aeb5f) --- diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh index 7e8a416c1..270a9d312 100755 --- a/modules.d/95nbd/module-setup.sh +++ b/modules.d/95nbd/module-setup.sh @@ -4,8 +4,6 @@ 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. @@ -16,6 +14,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 }