Accepting request 358323 from Base:System
1 OBS-URL: https://build.opensuse.org/request/show/358323 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=85
This commit is contained in:
commit
230b269390
@ -3,6 +3,7 @@ Subject: Don't include qemu network modules without reason
|
|||||||
|
|
||||||
virtio-net without other network tools does not make sense
|
virtio-net without other network tools does not make sense
|
||||||
and causes various bugs, like bsc#960669.
|
and causes various bugs, like bsc#960669.
|
||||||
|
This patch merges 90qemu-net into 90-kernel-network-modules.
|
||||||
|
|
||||||
---
|
---
|
||||||
modules.d/90kernel-network-modules/module-setup.sh | 24 ++++++++++++++++++++-
|
modules.d/90kernel-network-modules/module-setup.sh | 24 ++++++++++++++++++++-
|
||||||
@ -19,7 +20,7 @@ Index: dracut-044/modules.d/90kernel-network-modules/module-setup.sh
|
|||||||
|
|
||||||
+running_in_qemu() {
|
+running_in_qemu() {
|
||||||
+ if type -P systemd-detect-virt >/dev/null 2>&1; then
|
+ if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||||
+ vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
|
+ vm=$(systemd-detect-virt --vm 2>&1)
|
||||||
+ (($? != 0)) && return 255
|
+ (($? != 0)) && return 255
|
||||||
+ [[ $vm = "qemu" ]] && return 0
|
+ [[ $vm = "qemu" ]] && return 0
|
||||||
+ [[ $vm = "kvm" ]] && return 0
|
+ [[ $vm = "kvm" ]] && return 0
|
||||||
@ -39,24 +40,46 @@ Index: dracut-044/modules.d/90kernel-network-modules/module-setup.sh
|
|||||||
# called by dracut
|
# called by dracut
|
||||||
installkernel() {
|
installkernel() {
|
||||||
# Include wired net drivers, excluding wireless
|
# Include wired net drivers, excluding wireless
|
||||||
@@ -63,6 +82,8 @@ installkernel() {
|
@@ -63,6 +82,10 @@ installkernel() {
|
||||||
=drivers/net/ethernet \
|
=drivers/net/ethernet \
|
||||||
ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet
|
ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet
|
||||||
hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs
|
hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs
|
||||||
+
|
+
|
||||||
+ running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
|
+ if running_in_qemu; then
|
||||||
|
+ hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
|
||||||
|
+ fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
Index: dracut-044/modules.d/90qemu-net/module-setup.sh
|
Index: dracut-044/modules.d/90qemu-net/module-setup.sh
|
||||||
===================================================================
|
===================================================================
|
||||||
--- dracut-044.orig/modules.d/90qemu-net/module-setup.sh
|
--- dracut-044.orig/modules.d/90qemu-net/module-setup.sh
|
||||||
+++ dracut-044/modules.d/90qemu-net/module-setup.sh
|
+++ /dev/null
|
||||||
@@ -2,6 +2,7 @@
|
@@ -1,27 +0,0 @@
|
||||||
|
-#!/bin/bash
|
||||||
# called by dracut
|
-
|
||||||
check() {
|
-# called by dracut
|
||||||
+ return 255
|
-check() {
|
||||||
if type -P systemd-detect-virt >/dev/null 2>&1; then
|
- if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||||
vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
|
- vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
|
||||||
(($? != 0)) && return 255
|
- (($? != 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
|
||||||
|
-}
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Feb 6 19:16:32 UTC 2016 - fvogt@suse.com
|
||||||
|
|
||||||
|
- Fix 0208-no_forced_virtnet.patch:
|
||||||
|
- On non-QEMU systems it returned non-zero, causing dracut to fail
|
||||||
|
- Fixed boo#965477
|
||||||
|
- dracut.spec: Remove 90qemu-net entirely instead of disabling
|
||||||
|
- running_in_qemu was broken (reading output of >/dev/null)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 1 09:38:46 UTC 2016 - fvogt@suse.com
|
Mon Feb 1 09:38:46 UTC 2016 - fvogt@suse.com
|
||||||
|
|
||||||
|
@ -450,7 +450,6 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
|
|||||||
%{dracutlibdir}/modules.d/80cms
|
%{dracutlibdir}/modules.d/80cms
|
||||||
%{dracutlibdir}/modules.d/81cio_ignore
|
%{dracutlibdir}/modules.d/81cio_ignore
|
||||||
%{dracutlibdir}/modules.d/90livenet
|
%{dracutlibdir}/modules.d/90livenet
|
||||||
%{dracutlibdir}/modules.d/90qemu-net
|
|
||||||
%{dracutlibdir}/modules.d/90btrfs
|
%{dracutlibdir}/modules.d/90btrfs
|
||||||
%{dracutlibdir}/modules.d/90crypt
|
%{dracutlibdir}/modules.d/90crypt
|
||||||
%{dracutlibdir}/modules.d/90dm
|
%{dracutlibdir}/modules.d/90dm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user