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