dracut/0017-45ifcfg-use-distro-specific-scripts.patch
Stephan Kulow bb76751d8a Accepting request 236229 from home:hreinecke:branches:Base:System
- Rediff patches to match git repository
- 95fcoe: Check for FCoE devices prior to binaries
  * Modify 0055-95fcoe-Only-install-fcoe-module-if-required.patch
- 99base: Install chown instead of chgrp
  * Modify 0052-99base-Add-chown-binary.patch
- 95iscsi: do not try to detect iSCSI firmware during booting;
  should be handled via commandline parameter
  * Modify 0030-95iscsi-Autodetect-iSCSI-firmware.patch
- Rename patch:
  * old: 0051-mkinitrd-suse-add-update-booloader-message.patch
    new: 0051-mkinitrd-suse-add-update-bootloader-message.patch

OBS-URL: https://build.opensuse.org/request/show/236229
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=157
2014-06-07 05:11:38 +00:00

53 lines
1.7 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
Signed-off-by: Hannes Reinecke <hare@suse.de>
Modified-by: Thomas Rennigner <trenn@suse.de>
---
modules.d/40network/ifup.sh | 1 +
modules.d/45ifcfg/module-setup.sh | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 99d2ed4..934c61e 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -186,6 +186,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
}
diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh
index c407f45..164a580 100755
--- a/modules.d/45ifcfg/module-setup.sh
+++ b/modules.d/45ifcfg/module-setup.sh
@@ -4,7 +4,13 @@
# called by dracut
check() {
- [[ -d /etc/sysconfig/network-scripts ]] && return 0
+ local link=$(readlink $moddir/write-ifcfg.sh)
+ [[ "$link" = "write-ifcfg-suse.sh" ]] && \
+ [[ -d /etc/sysconfig/network ]] && \
+ return 0
+ [[ "$link" = "write-ifcfg-redhat.sh" ]] && \
+ [[ -d /etc/sysconfig/network-scripts ]] && \
+ return 0
return 255
}
--
1.8.4.5