You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
From 7316d68353cfd6e08f007d10ea3e32fa4d083487 Mon Sep 17 00:00:00 2001 |
|
From: Harald Hoyer <harald@redhat.com> |
|
Date: Tue, 1 Sep 2015 19:05:37 +0200 |
|
Subject: [PATCH] network/ifup: do DHCP for BOOTDEV |
|
|
|
--- |
|
modules.d/40network/ifup.sh | 19 ++++++++++++++----- |
|
1 file changed, 14 insertions(+), 5 deletions(-) |
|
|
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh |
|
index db9fb085..0471c425 100755 |
|
--- a/modules.d/40network/ifup.sh |
|
+++ b/modules.d/40network/ifup.sh |
|
@@ -430,11 +430,20 @@ fi |
|
|
|
# no ip option directed at our interface? |
|
if [ ! -e /tmp/net.${netif}.up ]; then |
|
- if getargs 'ip=dhcp6'; then |
|
- load_ipv6 |
|
- do_dhcp -6 |
|
- elif getargs 'ip=dhcp'; then |
|
- do_dhcp -4 |
|
+ if [ -e /tmp/net.bootdev ]; then |
|
+ BOOTDEV=$(cat /tmp/net.bootdev) |
|
+ if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then |
|
+ load_ipv6 |
|
+ do_dhcp |
|
+ fi |
|
+ else |
|
+ if getargs 'ip=dhcp6'; then |
|
+ load_ipv6 |
|
+ do_dhcp -6 |
|
+ fi |
|
+ if getargs 'ip=dhcp'; then |
|
+ do_dhcp -4 |
|
+ fi |
|
fi |
|
fi |
|
|
|
|