Remove dracut-network element

This element has not been functioning correctly for some time due to
an incorrect path to select-boot-kernel-initrd (should be /usr/local/bin).

The dracut-regenerate element can be used to regenerate dracut ramdisks
and is more flexible than this element.

Change-Id: I33d555ffd4a92b2948b2ea4a66b151f0422ccb8c
Closes-Bug: #1688546
This commit is contained in:
Mark Goddard 2017-05-29 18:55:53 +01:00 committed by Ian Wienand
parent 3ac57740c6
commit 54765fd2f4
8 changed files with 7 additions and 79 deletions

View File

@ -1,4 +1,6 @@
==============
dracut-network
==============
Extends dracut and build an initramfs with network support.
This element was removed in the Pike cycle. Please consider using the
dracut-regenerate element instead.

View File

@ -1,19 +0,0 @@
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index f6b7d9a..31cd1e6 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -74,7 +74,13 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
done
echo 'LABEL="net_end"'
- for iface in $MASTER_IFACES; do
+ if [ -n "$MASTER_IFACES" ]; then
+ wait_ifaces=$MASTER_IFACES
+ else
+ wait_ifaces=$IFACES
+ fi
+
+ for iface in $wait_ifaces; do
if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
fi

View File

@ -1,20 +0,0 @@
--- usr/lib/dracut/hooks/pre-pivot/85-write-ifcfg.sh 2013-05-30 14:01:37.492519066 +0000
+++ /85-write-ifcfg.sh 2013-05-30 14:03:09.832519065 +0000
@@ -4,6 +4,9 @@
# NFS root might have reached here before /tmp/net.ifaces was written
udevadm settle --timeout=30
+
+command -v ip_to_var >/dev/null || . /lib/net-lib.sh
+
# Don't write anything if we don't know our bootdev
[ -f /tmp/net.ifaces ] || return 1
@@ -98,6 +101,7 @@
fi
cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
{
+ ip_to_var $ip
echo "# Generated by dracut initrd"
echo "DEVICE=$netif"
echo "ONBOOT=yes"

View File

@ -1,2 +0,0 @@
package-installs
select-boot-kernel-initrd

View File

@ -1,13 +0,0 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
RET=$(/bin/select-boot-kernel-initrd)
KERNEL_VERSION=`echo ${RET%:*} | sed 's/vmlinuz-//g'`
RAMDISK=/boot/${RET#*:}
dracut --force --add "network" $RAMDISK $KERNEL_VERSION

View File

@ -1,22 +0,0 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# If the patch doesn't apply just do nothing. This patch fixes a small
# issue in the script that writes the network configuration files from
# the cmdline to the disk on FC18/FC19.
#
#for dracut-network 029 we need a different patch:
# http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=613ed5cd764d54cac082a1e7b7e8d1f1fed29d35
IFCFG_FILE="/usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh"
NETGEN_FILE="/usr/lib/dracut/modules.d/40network/net-genrules.sh"
if patch --dry-run $NETGEN_FILE < $(dirname $0)/../dracut-029-netgen.patch > /dev/null; then
patch $NETGEN_FILE < $(dirname $0)/../dracut-029-netgen.patch || true
else
patch $IFCFG_FILE < $(dirname $0)/../dracut-write-ifcfg.patch || true
fi

View File

@ -1,2 +0,0 @@
dracut-network:
patch:

View File

@ -0,0 +1,4 @@
---
deprecations:
- The ``dracut-network`` element has been removed. It has not been
functioning for some time due to incorrect paths.