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

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