From: Thomas Renninger <trenn-IBi9RG/b67k@public.gmane.org>
To: harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
thomas.blume-IBi9RG/b67k@public.gmane.org,
pwieczorkiewicz-l3A5Bk7waGM@public.gmane.org,
hare-IBi9RG/b67k@public.gmane.org,
fvogt-IBi9RG/b67k@public.gmane.org,
trenn-IBi9RG/b67k@public.gmane.org
Subject: [PATCH 09/12] kernel-network-modules: Don't include qemu network modules without reason
Date: Thu, 12 May 2016 20:03:33 +0200 [thread overview]
Message-ID: <1463076216-410-10-git-send-email-trenn@suse.com> (raw)
In-Reply-To: <1463076216-410-1-git-send-email-trenn-IBi9RG/b67k@public.gmane.org>
From: Fabian Vogt <fvogt-IBi9RG/b67k@public.gmane.org>
virtio-net without other network tools does not make sense
and causes various bugs, like:
https://bugzilla.suse.com/show_bug.cgi?id=960669
This patch merges 90qemu-net into 90-kernel-network-modules.
Signed-off-by: Thomas Renninger <trenn-IBi9RG/b67k@public.gmane.org>
---
modules.d/90kernel-network-modules/module-setup.sh | 25 ++++++++++++++++++++
modules.d/90qemu-net/module-setup.sh | 27 ----------------------
2 files changed, 25 insertions(+), 27 deletions(-)
delete mode 100755 modules.d/90qemu-net/module-setup.sh
diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh
index 11fbab9..b2c3547 100755
--- a/modules.d/90kernel-network-modules/module-setup.sh
+++ b/modules.d/90kernel-network-modules/module-setup.sh
@@ -10,6 +10,25 @@ depends() {
return 0
}
+running_in_qemu() {
+ if type -P systemd-detect-virt >/dev/null 2>&1; then
+ vm=$(systemd-detect-virt --vm 2>&1)
+ (($? != 0)) && return 255
+ [[ $vm = "qemu" ]] && return 0
+ [[ $vm = "kvm" ]] && return 0
+ [[ $vm = "bochs" ]] && return 0
+ fi
+
+ for i in /sys/class/dmi/id/*_vendor; do
+ [[ -f $i ]] || continue
+ read vendor < $i
+ [[ "$vendor" == "QEMU" ]] && return 0
+ [[ "$vendor" == "Bochs" ]] && return 0
+ done
+
+ return 255
+}
+
# called by dracut
installkernel() {
# Include wired net drivers, excluding wireless
@@ -30,6 +49,12 @@ installkernel() {
=drivers/net/ethernet \
ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net
hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs
+
+ if running_in_qemu; then
+ hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
+ else
+ return 0
+ fi
}
# called by dracut
diff --git a/modules.d/90qemu-net/module-setup.sh b/modules.d/90qemu-net/module-setup.sh
deleted file mode 100755
index 58f1233..0000000
--- a/modules.d/90qemu-net/module-setup.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# called by dracut
-check() {
- if type -P systemd-detect-virt >/dev/null 2>&1; then
- vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
- (($? != 0)) && return 255
- [[ $vm = "qemu" ]] && return 0
- [[ $vm = "kvm" ]] && return 0
- [[ $vm = "bochs" ]] && return 0
- fi
-
- for i in /sys/class/dmi/id/*_vendor; do
- [[ -f $i ]] || continue
- read vendor < $i
- [[ "$vendor" == "QEMU" ]] && return 0
- [[ "$vendor" == "Bochs" ]] && return 0
- done
-
- return 255
-}
-
-# called by dracut
-installkernel() {
- # qemu specific modules
- hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
-}
--
2.1.4
next prev parent reply other threads:[~2016-05-12 18:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 18:03 Recent network bug fixes from the latest SuSE dracut repo Thomas Renninger
[not found] ` <1463076216-410-1-git-send-email-trenn-IBi9RG/b67k@public.gmane.org>
2016-05-12 18:03 ` [PATCH 01/12] 40network: Fix race condition when wait for networks Thomas Renninger
2016-05-12 18:03 ` [PATCH 02/12] 40network: always start netroot in ifup.sh Thomas Renninger
2016-05-12 18:03 ` [PATCH 03/12] 40network: Only enable network interfaces if explicitly requested Thomas Renninger
2016-05-12 18:03 ` [PATCH 04/12] 40network: Update iBFT scanning code to handle IPv6 Thomas Renninger
2016-05-12 18:03 ` [PATCH 05/12] 40network: separate 'mask' and 'prefix' Thomas Renninger
2016-05-12 18:03 ` [PATCH 06/12] network/iscsi: Skip invalid ibft dhcp address Thomas Renninger
2016-05-12 18:03 ` [PATCH 07/12] nfs: Fix nfs rootfs in case of mounting via IPv4 not hostname Thomas Renninger
2016-05-12 18:03 ` [PATCH 08/12] NFS: Support host being a DNS ALIAS Thomas Renninger
2016-05-12 18:03 ` Thomas Renninger [this message]
2016-05-12 18:03 ` [PATCH 10/12] fcoe-uefi: Add check for usage Thomas Renninger
2016-05-12 18:03 ` [PATCH 11/12] mulitpath: Boot up, also without multipath.conf, it is not mandatory Thomas Renninger
2016-05-12 18:03 ` [PATCH 12/12] multipath: Fix warning about multipath if not needed Thomas Renninger
2016-05-18 9:22 ` Recent network bug fixes from the latest SuSE dracut repo Harald Hoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463076216-410-10-git-send-email-trenn@suse.com \
--to=trenn-ibi9rg/b67k@public.gmane.org \
--cc=fvogt-IBi9RG/b67k@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hare-IBi9RG/b67k@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pwieczorkiewicz-l3A5Bk7waGM@public.gmane.org \
--cc=thomas.blume-IBi9RG/b67k@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox