Hi,

here are three small patches with some bugfixes:

0001:
check also for zypp-plugin-spacewalk if try to validate if an autoinstallation 
is possible

0002:
SUSE systems return only the short hostname while calling gethostname()
If no "." is in the hostname use socket.getfqdn() function.

0003:
fix reading cpuinfo on s390x

Btw: looking at the ppc64 part of the code, it set the key 'vendor' which is 
nowhere else used. It looks like a bug. Should this be 'type' like for the 
other archs?

-- 
Regards

        Michael Calmer

--------------------------------------------------------------------------
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--------------------------------------------------------------------------
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)
>From a9c1c07733c5afe4cb020516ea994f2856a60799 Mon Sep 17 00:00:00 2001
From: Michael Calmer <m...@suse.de>
Date: Fri, 15 Feb 2013 15:09:28 +0100
Subject: [PATCH 1/3] check for zypp-plugin-spacewalk if testing autoinstall
 capability

---
 .../com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index 3737c5b..c7168ae 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -1122,6 +1122,10 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
                 // found yum-rhn-plugin - returning
                 return null;
             }
+            if (pli.getName().equals("zypp-plugin-spacewalk")) {
+                // found zypp-plugin-spacewalk - returning
+                return null;
+            }
 
             if (pli.getName().equals("up2date")) {
                 log.debug("    found up2date ...");
-- 
1.8.1.2

>From 45efce4ca755b3ce5a851bc6afe9316eb82ea10e Mon Sep 17 00:00:00 2001
From: Michael Calmer <m...@suse.de>
Date: Fri, 15 Feb 2013 15:14:10 +0100
Subject: [PATCH 2/3] try to get the FQDN as hostname

---
 client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 2 ++
 1 file changed, 2 insertions(+)

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 97ba6b6..23d627b 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -509,6 +509,8 @@ def read_network():
 
     if netdict['hostname'] == "unknown":
         netdict['hostname'] = gethostname()
+        if "." not in netdict['hostname']:
+            netdict['hostname'] = socket.getfqdn()
 
     if netdict['ipaddr'] is None:
         try:
-- 
1.8.1.2

>From eca5134ab049d4247a86d693591b0dd18a272afa Mon Sep 17 00:00:00 2001
From: Michael Calmer <m...@suse.de>
Date: Fri, 15 Feb 2013 15:15:13 +0100
Subject: [PATCH 3/3] fix reading cpuinfo on s390x

---
 client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 23d627b..383e3b9 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -294,7 +294,7 @@ def read_cpuinfo():
     elif uname in ['s390', 's390x']:
         tmpdict = {}
         for cpu in cpulist.split("\n"):
-            vals = cpu.split(cpu, ": ")
+            vals = cpu.split(": ")
             if len(vals) != 2:
                 continue
             tmpdict[vals[0].strip()] = vals[1].strip()
-- 
1.8.1.2

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to