Annotation of /trunk/dracut/patches/dracut-034-before-doing-dhcp-check-if-the-link-has-a-carrier.patch
Parent Directory | Revision Log
Revision 2370 -
(hide annotations)
(download)
Mon Jan 20 09:52:51 2014 UTC (10 years, 8 months ago) by niro
File size: 897 byte(s)
Mon Jan 20 09:52:51 2014 UTC (10 years, 8 months ago) by niro
File size: 897 byte(s)
-added upstream patches to fix networking
1 | niro | 2370 | From 271cd19dbe895c24b1f70fa5c6bbecace3b97f4d Mon Sep 17 00:00:00 2001 |
2 | From: Harald Hoyer <harald@redhat.com> | ||
3 | Date: Mon, 02 Dec 2013 09:38:21 +0000 | ||
4 | Subject: network/ifup.sh: before doing dhcp, check, if the link has a carrier | ||
5 | |||
6 | --- | ||
7 | diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh | ||
8 | index 9f6f449..2edcfe6 100755 | ||
9 | --- a/modules.d/40network/ifup.sh | ||
10 | +++ b/modules.d/40network/ifup.sh | ||
11 | @@ -87,6 +87,10 @@ do_dhcp() { | ||
12 | # dhclient-script will mark the netif up and generate the online | ||
13 | # event for nfsroot | ||
14 | # XXX add -V vendor class and option parsing per kernel | ||
15 | + if ! iface_has_link $netif; then | ||
16 | + echo "No carrier detected" | ||
17 | + return 1 | ||
18 | + fi | ||
19 | echo "Starting dhcp for interface $netif" | ||
20 | dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \ | ||
21 | || echo "dhcp failed" | ||
22 | -- | ||
23 | cgit v0.9.2 |