2014-06-07 05:11:38 +00:00
|
|
|
From 2bddf461e38b952a79e31650ba828a7ee506cbe9 Mon Sep 17 00:00:00 2001
|
2014-04-09 12:44:32 +00:00
|
|
|
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.
|
|
|
|
|
2014-04-30 15:29:13 +00:00
|
|
|
- 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
|
2014-05-06 11:22:17 +00:00
|
|
|
|
2016-01-27 16:45:27 +00:00
|
|
|
- Also revert upstream commit f34e1d6, to not forcibly include 45ifcfg
|
|
|
|
and thus the whole network stack (bsc#960669)
|
|
|
|
|
2014-05-06 11:22:17 +00:00
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
|
|
Modified-by: Thomas Rennigner <trenn@suse.de>
|
2016-01-27 16:45:27 +00:00
|
|
|
Modified-by: Fabian Vogt <fvogt@suse.com>
|
2014-04-09 12:44:32 +00:00
|
|
|
---
|
2016-01-27 16:45:27 +00:00
|
|
|
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(-)
|
2014-04-09 12:44:32 +00:00
|
|
|
|
2015-11-26 11:35:04 +00:00
|
|
|
Index: dracut-044/modules.d/40network/ifup.sh
|
2015-03-31 14:12:12 +00:00
|
|
|
===================================================================
|
2015-11-26 11:35:04 +00:00
|
|
|
--- dracut-044.orig/modules.d/40network/ifup.sh
|
|
|
|
+++ dracut-044/modules.d/40network/ifup.sh
|
|
|
|
@@ -189,6 +189,7 @@ do_dhcp() {
|
2014-04-09 12:44:32 +00:00
|
|
|
$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
|
|
|
|
}
|
2015-11-26 11:35:04 +00:00
|
|
|
Index: dracut-044/modules.d/45ifcfg/module-setup.sh
|
2015-03-31 14:12:12 +00:00
|
|
|
===================================================================
|
2015-11-26 11:35:04 +00:00
|
|
|
--- dracut-044.orig/modules.d/45ifcfg/module-setup.sh
|
|
|
|
+++ dracut-044/modules.d/45ifcfg/module-setup.sh
|
2016-01-27 16:45:27 +00:00
|
|
|
@@ -2,7 +2,6 @@
|
2014-02-17 13:21:58 +00:00
|
|
|
|
|
|
|
# called by dracut
|
|
|
|
check() {
|
|
|
|
- [[ -d /etc/sysconfig/network-scripts ]] && return 0
|
2016-01-27 16:45:27 +00:00
|
|
|
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"
|
2014-02-17 13:21:58 +00:00
|
|
|
+ local link=$(readlink $moddir/write-ifcfg.sh)
|
|
|
|
+ [[ "$link" = "write-ifcfg-suse.sh" ]] && \
|
|
|
|
+ [[ -d /etc/sysconfig/network ]] && \
|
2016-01-27 16:45:27 +00:00
|
|
|
+ echo "ifcfg"
|
2014-02-17 13:21:58 +00:00
|
|
|
+ [[ "$link" = "write-ifcfg-redhat.sh" ]] && \
|
|
|
|
+ [[ -d /etc/sysconfig/network-scripts ]] && \
|
2016-01-27 16:45:27 +00:00
|
|
|
+ echo "ifcfg"
|
|
|
|
return 0
|
2014-02-17 13:21:58 +00:00
|
|
|
}
|
|
|
|
|