dracut/0544-40network-Make-ip-dhcp-work.patch
Daniel Molkentin 8d109f57bd Accepting request 556733 from home:dmolkentin:branches:Base:System
- Support AMD CPU families 0x16 and 0x17 (bsc#1072424)
  * Adds 0545-Add-early-microcode-support-for-AMD-family-16h.patch
  * Adds 0546-Support-Microcode-Updates-for-AMD-CPU-Family-0x17.patch

- Make ip=dhcp work. Previously, a network interface specifier was required.
  The new behaviour matches documented behaviour.
  Adds 0544-40network-Make-ip-dhcp-work.patch 

- Remove 00systemd-bootchart, which is gone from systemd for some time (bsc#1067279)
  Adds 0543-Remove-00systemd-bootchart.patch
- Ensure 0541-Make-sure-70-persistent-net.rules-is-included-in-ini.patch is
  not applied on Leap either

OBS-URL: https://build.opensuse.org/request/show/556733
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=326
2017-12-13 16:42:36 +00:00

70 lines
1.7 KiB
Diff

From 9d4167efa9b6f093f1a37cb07bc744e763a5d292 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Fri, 8 Dec 2017 09:51:47 +0100
Subject: [PATCH] 40network: Make ip=dhcp work
This fixes ip=dhcp to behave exactly like ip=<dev>:dhcp, as indicated
in the documentation.
Reference: bsc#1069163
---
modules.d/40network/ifup.sh | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index a684cba0..d9a418e5 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -497,6 +497,19 @@ if [ -z "$ip" ]; then
fi
fi
+bring_online() {
+ > /tmp/net.${netif}.up
+
+ if [ -e /sys/class/net/${netif}/address ]; then
+ > /tmp/net.$(cat /sys/class/net/${netif}/address).up
+ fi
+
+ setup_net $netif
+ source_hook initqueue/online $netif
+ if [ -z "$manualup" ]; then
+ /sbin/netroot $netif
+ fi
+}
# Specific configuration, spin through the kernel command line
# looking for ip= lines
@@ -555,17 +568,7 @@ for p in $(getargs ip=); do
done
if [ $? -eq 0 ]; then
- > /tmp/net.${netif}.up
-
- if [ -e /sys/class/net/${netif}/address ]; then
- > /tmp/net.$(cat /sys/class/net/${netif}/address).up
- fi
-
- setup_net $netif
- source_hook initqueue/online $netif
- if [ -z "$manualup" ]; then
- /sbin/netroot $netif
- fi
+ bring_online
fi
done
@@ -593,6 +596,9 @@ if [ ! -e /tmp/net.${netif}.up ]; then
do_dhcp -4
fi
fi
+ if [ $? -eq 0 ]; then
+ bring_online
+ fi
fi
if [ -e /tmp/net.${netif}.up ]; then
--
2.13.6