File 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch of Package dracut.608

From 0314d2a2e1483a6535db88f3038ff5a43259bafd Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Mon, 18 Aug 2014 19:06:13 +0200
Subject: iscsi: Avoid bad ip route call on empty address

Without this patch it will lead to:
Command line is not complete. Try option "help"
error messages on specific host devs.

Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 modules.d/95iscsi/module-setup.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index f63634a..94eb023 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -76,6 +76,7 @@ install_iscsiroot() {
         esac
     done
 
+    [ -z "$iscsi_address" ] && return
     local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p')
     ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
     printf 'ip=%s:static ' ${ifname}
-- 
1.8.4.5

openSUSE Build Service is sponsored by