]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test/NBD: check for nbd kernel module first
authorHarald Hoyer <harald@redhat.com>
Fri, 16 Apr 2010 15:54:29 +0000 (17:54 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 16 Apr 2010 15:59:51 +0000 (17:59 +0200)
test/TEST-40-NBD/test.sh

index 8da1ba419a17361a760fa2049f566f59f53f00e8..1a46ed14499e5e842d8280e4cc43f7f31659d25b 100755 (executable)
@@ -84,6 +84,7 @@ client_test() {
 }
 
 test_run() {
+    modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; exit 1; }
     if ! run_server; then
        echo "Failed to start server" 1>&2
        return 1
@@ -287,6 +288,9 @@ make_server_root() {
 }
 
 test_setup() {
+
+    modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; exit 1; }
+
     make_encrypted_root || return 1
     make_client_root || return 1
     make_server_root || return 1