]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ifcfg/write-ifcfg.sh: turn on IPV6INIT, if any inet6 address is found
authorHarald Hoyer <harald@redhat.com>
Thu, 3 Apr 2014 06:53:09 +0000 (08:53 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 09:52:07 +0000 (11:52 +0200)
If "ip -6 addr" finds any inet6 address, assume IPV6INIT=yes for the
ifcfg file.

modules.d/45ifcfg/write-ifcfg.sh

index e2fa48505365ec6a8f433126d8e6d8675e174148..486c69a3c71b00feebec9da7538a49b3023d9446 100755 (executable)
@@ -122,7 +122,7 @@ for netup in /tmp/net.*.did-setup ; do
         echo "UUID=\"$uuid\""
         if [ -f /tmp/dhclient.$netif.lease ]; then
             [ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
-            strstr "$ip" '*:*:*' && echo "IPV6INIT=yes"
+            strstr "$(ip -6 addr show dev $netif)" 'inet6' && echo "IPV6INIT=yes"
             if [ -f /tmp/net.$netif.has_ibft_config ]; then
                 echo "BOOTPROTO=ibft"
             else