]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
nbd/check: moved host-only checks and added ";"
authorHarald Hoyer <harald@redhat.com>
Wed, 19 Aug 2009 15:09:53 +0000 (17:09 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 19 Aug 2009 15:09:53 +0000 (17:09 +0200)
modules.d/95nbd/check

index 1443129fd141cf08623da84ceb59b28a4ce221da..a84ed1dfa428a07eac0e1e46780ad5421cf18123 100755 (executable)
@@ -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