---

 So this is partial fix for the cases where there is no qeth/ctc
 device, ie. PCI only LPAR & z/VM or KVM virtual machines. In such
 cases we shouldn't bother the user with pointless questions. If there
 is e.g. PCI and qeth network cards, and user doesn't want to
 configure qeth card, one cannot skip doing that. I think we should
 introduce "Finish" or "Skip" option similar to what is proposed in
 the patch from Viktor as "other".

 debian/changelog | 8 ++++++++
 netdevice.c      | 7 +++++++
 2 files changed, 15 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 581fb80..f7177e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+s390-netdevice (0.0.45) UNRELEASED; urgency=medium
+
+  * Skip s390-netdevice module, if there are no qeth/ctc devices to
+    configure which is the case in modern KVM based installation, as well
+    as LPAR and z/VM with PCI network cards. Closes: #825931
+
+ -- Dimitri John Ledkov <x...@ubuntu.com>  Thu, 02 Jun 2016 10:53:34 +0100
+
 s390-netdevice (0.0.44) unstable; urgency=medium
 
   [ Updated translations ]
diff --git a/netdevice.c b/netdevice.c
index c886170..273c7d9 100644
--- a/netdevice.c
+++ b/netdevice.c
@@ -294,6 +294,13 @@ static enum state_wanted detect_devices (void)
 
 static enum state_wanted get_networktype (void)
 {
+       /* Check if there is anything to activate */
+       if ((di_tree_size (channels) == 0) &&
+           (di_tree_size (devices) == 0)) {
+               syslog (LOG_ERR, "No qeth/ctc network devices found, skipping 
s390-netdevice.");
+               return WANT_FINISH;
+       }
+
        char *ptr;
        int ret = my_debconf_input ("critical", TEMPLATE_PREFIX 
"choose_networktype", &ptr);
 
-- 
2.7.4

Reply via email to