client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 5d26a49ad50abaf018321320e084431d5200be79
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Tue Aug 23 11:30:37 2011 +0200
Revert "727908 - registration: send correct hostname during kickstart"
This reverts commit bd4cc512b94ee378a891da5f3f2fa295b600ca10.
This problem is no longer an issue in RHEL-6.1 and beyond. Reverting.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index 6a4eabd..ca80e5b 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -487,13 +487,15 @@ def read_network():
except:
netdict['ipaddr'] = "127.0.0.1"
- hostname, ipaddr = findHostByRoute()
- if netdict['hostname'] != hostname and hostname !=
'localhost.localdomain':
- netdict['hostname'] = hostname
+ if netdict['hostname'] == 'localhost.localdomain' or \
+ netdict['ipaddr'] == "127.0.0.1":
+ hostname, ipaddr = findHostByRoute()
- if netdict['ipaddr'] != ipaddr and ipaddr != "127.0.0.1":
- netdict['ipaddr'] = ipaddr
+ if netdict['hostname'] == 'localhost.localdomain':
+ netdict['hostname'] = hostname
+ if netdict['ipaddr'] == "127.0.0.1":
+ netdict['ipaddr'] = ipaddr
if netdict['ipaddr'] is None:
netdict['ipaddr'] = ''
Show replies by date