From: Harald Hoyer Date: Wed, 19 Aug 2009 15:09:53 +0000 (+0200) Subject: nbd/check: moved host-only checks and added ";" X-Git-Tag: 001~34^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=495a964322a5d1a647884931a657ae6d2ec543d4;p=thirdparty%2Fdracut.git nbd/check: moved host-only checks and added ";" --- diff --git a/modules.d/95nbd/check b/modules.d/95nbd/check index 1443129fd..a84ed1dfa 100755 --- a/modules.d/95nbd/check +++ b/modules.d/95nbd/check @@ -5,13 +5,12 @@ # If our prerequisites are not met, fail. which nbd-client >/dev/null 2>&1 || exit 1 -is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] } - -. $dracutfunctions - # if an nbd device is not somewhere in the chain of devices root is mounted on, # fail the hostonly check. [ "$1" = "-h" ] && { + is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;} + . $dracutfunctions + rootdev=$(find_root_block_device) [[ -b /dev/block/$rootdev ]] || exit 1 check_block_and_slaves is_nbd "$rootdev" || exit 1