Blame SOURCES/0148-network-dhclient-script-do-PREINIT6-for-DHCP6.patch

712866
From 89f2586ae93e948cb9c41f971423431e8cccf236 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Mon, 17 Mar 2014 13:00:17 +0100
712866
Subject: [PATCH] network:dhclient-script do PREINIT6 for DHCP6
712866
712866
---
712866
 modules.d/40network/dhclient-script.sh | 29 ++++++++++++++++-------------
712866
 modules.d/40network/ifup.sh            |  1 +
712866
 2 files changed, 17 insertions(+), 13 deletions(-)
712866
712866
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
5c6c2a
index 822cce95..50e89326 100755
712866
--- a/modules.d/40network/dhclient-script.sh
712866
+++ b/modules.d/40network/dhclient-script.sh
712866
@@ -2,6 +2,17 @@
712866
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
712866
 # ex: ts=8 sw=4 sts=4 et filetype=sh
712866
 
712866
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
712866
+
712866
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
712866
+type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
712866
+
712866
+# We already need a set netif here
712866
+netif=$interface
712866
+
712866
+# Huh? Interface configured?
712866
+[ -f "/tmp/net.$netif.up" ] && exit 0
712866
+
712866
 setup_interface() {
712866
     ip=$new_ip_address
712866
     mtu=$new_interface_mtu
712866
@@ -73,25 +84,17 @@ setup_interface6() {
712866
     [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
712866
 }
712866
 
712866
-PATH=/usr/sbin:/usr/bin:/sbin:/bin
712866
-
712866
-export PS4="dhclient.$interface.$$ + "
712866
-exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
712866
-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
712866
-type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
712866
-
712866
-# We already need a set netif here
712866
-netif=$interface
712866
-
712866
-# Huh? Interface configured?
712866
-[ -f "/tmp/net.$netif.up" ] && exit 0
712866
-
712866
 case $reason in
712866
     PREINIT)
712866
         echo "dhcp: PREINIT $netif up"
712866
         linkup $netif
712866
         ;;
712866
 
712866
+    PREINIT6)
712866
+        echo "dhcp: PREINIT $netif up"
712866
+        linkup $netif
712866
+        ;;
712866
+
712866
     BOUND)
712866
         echo "dhcp: BOND setting $netif"
712866
         unset layer2
712866
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
5c6c2a
index 02dfc947..51b0d528 100755
712866
--- a/modules.d/40network/ifup.sh
712866
+++ b/modules.d/40network/ifup.sh
712866
@@ -328,6 +328,7 @@ for p in $(getargs ip=); do
712866
         dhcp|on|any)
712866
             do_dhcp -4 ;;
712866
         dhcp6)
712866
+            load_ipv6
712866
             do_dhcp -6 ;;
712866
         auto6)
712866
             do_ipv6auto ;;