Blame SOURCES/0159-ifcfg-write-ifcfg.sh-turn-on-IPV6INIT-if-any-inet6-a.patch

18971c
From f1ea5376ed00e4e18b3829e4f267973bb9816f72 Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Thu, 3 Apr 2014 08:53:09 +0200
18971c
Subject: [PATCH] ifcfg/write-ifcfg.sh: turn on IPV6INIT, if any inet6 address
18971c
 is found
18971c
18971c
If "ip -6 addr" finds any inet6 address, assume IPV6INIT=yes for the
18971c
ifcfg file.
18971c
---
18971c
 modules.d/45ifcfg/write-ifcfg.sh | 2 +-
18971c
 1 file changed, 1 insertion(+), 1 deletion(-)
18971c
18971c
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
18971c
index e2fa4850..486c69a3 100755
18971c
--- a/modules.d/45ifcfg/write-ifcfg.sh
18971c
+++ b/modules.d/45ifcfg/write-ifcfg.sh
18971c
@@ -122,7 +122,7 @@ for netup in /tmp/net.*.did-setup ; do
18971c
         echo "UUID=\"$uuid\""
18971c
         if [ -f /tmp/dhclient.$netif.lease ]; then
18971c
             [ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
18971c
-            strstr "$ip" '*:*:*' && echo "IPV6INIT=yes"
18971c
+            strstr "$(ip -6 addr show dev $netif)" 'inet6' && echo "IPV6INIT=yes"
18971c
             if [ -f /tmp/net.$netif.has_ibft_config ]; then
18971c
                 echo "BOOTPROTO=ibft"
18971c
             else