|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
From 2e094b20a6875fdb0a7ef8772e3d7688ad91c036 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
From: Harald Hoyer <harald@redhat.com>
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
Date: Fri, 4 Apr 2014 12:52:39 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
Subject: [PATCH] ifcfg: only bind to HWADDR, if addr_assign_type == 0
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
/sys/class/net/$netif/addr_assign_type is != 0 for random MAC address
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
interfaces
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
modules.d/40network/net-lib.sh | 3 ---
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
modules.d/45ifcfg/write-ifcfg.sh | 2 ++
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
2 files changed, 2 insertions(+), 3 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
index 5d4ae32cbb..d53e1a6ea9 100755
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
--- a/modules.d/40network/net-lib.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+++ b/modules.d/40network/net-lib.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
@@ -518,9 +518,6 @@ find_iface_with_link() {
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
is_persistent_ethernet_name() {
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
- [ -f /sys/class/net/$netif/addr_assign_type ] || return 1
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
- [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] || return 1
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
-
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
case "$1" in
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
# udev persistent interface names
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*)
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
index 2631fbe2ee..5dc351d584 100755
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
--- a/modules.d/45ifcfg/write-ifcfg.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+++ b/modules.d/45ifcfg/write-ifcfg.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
@@ -166,6 +166,8 @@ for netup in /tmp/net.*.did-setup ; do
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
if ! print_s390 $netif; then
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
if [ -z "$macaddr" ] && \
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
! is_persistent_ethernet_name "$netif" && \
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+ [ -f /sys/class/net/$netif/addr_assign_type ] && \
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+ [ "$(cat /sys/class/net/$netif/addr_assign_type)" = "0" ] && \
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
[ -f /sys/class/net/$netif/address ]; then
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\""
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
fi
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
--
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
1.9.3
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|