dracut/0017-45ifcfg-use-distro-specific-scripts.patch
Thomas Renninger 233f49d9a7 Accepting request 356300 from home:favogt:branches:Base:System
Modify 0017-45ifcfg-use-distro-specific-scripts.patch:
 - Also revert upstream commit f34e1d6b to not forcibly
   include network and ifcfg modules (bsc#960669)
Refresh:
  - 0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch
  - 0132-40network-fixup-static-network-configuration.patch
  - 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch
  - 0402-driver-fail-summary.patch
Add 0209-fix_modules_load_d_hostonly.patch:
  - Fix modules-load.d with hostonly (boo#962224)

OBS-URL: https://build.opensuse.org/request/show/356300
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=248
2016-01-27 16:45:27 +00:00

66 lines
2.3 KiB
Diff

From 2bddf461e38b952a79e31650ba828a7ee506cbe9 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
Date: Tue, 8 Apr 2014 08:48:27 +0200
Subject: [PATCH] 45ifcfg: use distro-specific scripts
Detect the system flavor and write the ifcfg files accordingly.
- Do not move ifcfg to -suse and -redhat files to avoid re-diffing after
each upgrade. Handle this in the spec file and a separate
write-ifcfg-suse.sh source file
- Also revert upstream commit f34e1d6, to not forcibly include 45ifcfg
and thus the whole network stack (bsc#960669)
Signed-off-by: Hannes Reinecke <hare@suse.de>
Modified-by: Thomas Rennigner <trenn@suse.de>
Modified-by: Fabian Vogt <fvogt@suse.com>
---
modules.d/40network/ifup.sh | 1 +
modules.d/40network/module-setup.sh | 7 +++++++
modules.d/45ifcfg/module-setup.sh | 1 -
3 files changed, 8 insertions(+), 1 deletion(-)
Index: dracut-044/modules.d/40network/ifup.sh
===================================================================
--- dracut-044.orig/modules.d/40network/ifup.sh
+++ dracut-044/modules.d/40network/ifup.sh
@@ -189,6 +189,7 @@ do_dhcp() {
$dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
dhcp_apply $1 || return $?
+ echo $netif > /tmp/net.${netif}.did-setup
echo $netif > /tmp/setup_net_${netif}.ok
return 0
}
Index: dracut-044/modules.d/45ifcfg/module-setup.sh
===================================================================
--- dracut-044.orig/modules.d/45ifcfg/module-setup.sh
+++ dracut-044/modules.d/45ifcfg/module-setup.sh
@@ -2,7 +2,6 @@
# called by dracut
check() {
- [[ -d /etc/sysconfig/network-scripts ]] && return 0
return 255
}
Index: dracut-044/modules.d/40network/module-setup.sh
===================================================================
--- dracut-044.orig/modules.d/40network/module-setup.sh
+++ dracut-044/modules.d/40network/module-setup.sh
@@ -15,6 +15,13 @@ check() {
# called by dracut
depends() {
echo "kernel-network-modules"
+ local link=$(readlink $moddir/write-ifcfg.sh)
+ [[ "$link" = "write-ifcfg-suse.sh" ]] && \
+ [[ -d /etc/sysconfig/network ]] && \
+ echo "ifcfg"
+ [[ "$link" = "write-ifcfg-redhat.sh" ]] && \
+ [[ -d /etc/sysconfig/network-scripts ]] && \
+ echo "ifcfg"
return 0
}