diff -Naur dracut-059/modules.d/35network-legacy/dhcpcd-script.sh dracut-059-udhcpd/modules.d/35network-legacy/dhcpcd-script.sh
--- dracut-059/modules.d/35network-legacy/dhcpcd-script.sh	1970-01-01 01:00:00.000000000 +0100
+++ dracut-059-udhcpd/modules.d/35network-legacy/dhcpcd-script.sh	2023-07-27 11:45:45.296355868 +0200
@@ -0,0 +1,261 @@
+#!/bin/sh
+
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
+type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
+
+# We already need a set netif here
+netif=$interface
+
+setup_interface() {
+    ip=$new_ip_address
+    mtu=$new_interface_mtu
+    mask=$new_subnet_mask
+    bcast=$new_broadcast_address
+    gw=${new_routers%%,*}
+    domain=$new_domain_name
+    search=$(printf -- "$new_domain_search")
+    namesrv=$new_domain_name_servers
+    hostname=$new_host_name
+    [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+    [ -n "$new_max_life" ] && lease_time=$new_max_life
+    preferred_lft=$lease_time
+    [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+
+    [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
+
+    # Taken from debian dhclient-script:
+    # The 576 MTU is only used for X.25 and dialup connections
+    # where the admin wants low latency.  Such a low MTU can cause
+    # problems with UDP traffic, among other things.  As such,
+    # disallow MTUs from 576 and below by default, so that broken
+    # MTUs are ignored, but higher stuff is allowed (1492, 1500, etc).
+    if [ -n "$mtu" ] && [ $mtu -gt 576 ] ; then
+        if ! ip link set $netif mtu $mtu ; then
+            ip link set $netif down
+            ip link set $netif mtu $mtu
+            linkup $netif
+        fi
+    fi
+
+    ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif \
+        ${lease_time:+valid_lft $lease_time} \
+        ${preferred_lft:+preferred_lft ${preferred_lft}}
+
+    if [ -n "$gw" ] ; then
+        if [ "$mask" = "255.255.255.255" ] ; then
+            # point-to-point connection => set explicit route to gateway
+            echo ip route add $gw dev $netif > /tmp/net.$netif.gw
+        fi
+
+        echo "$gw" | {
+            IFS=' ' read -r main_gw other_gw
+            echo ip route replace default via $main_gw dev $netif >> /tmp/net.$netif.gw
+            if [ -n "$other_gw" ] ; then
+                for g in $other_gw; do
+                    echo ip route add default via $g dev $netif >> /tmp/net.$netif.gw
+                done
+            fi
+        }
+    fi
+
+    if getargbool 1 rd.peerdns; then
+        [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
+        if  [ -n "$namesrv" ] ; then
+            for s in $namesrv; do
+                echo nameserver $s
+            done
+        fi >> /tmp/net.$netif.resolv.conf
+    fi
+    # Note: hostname can be fqdn OR short hostname, so chop off any
+    # trailing domain name and explicity add any domain if set.
+    [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+}
+
+setup_interface6() {
+    domain=$new_domain_name
+    search=$(printf -- "$new_domain_search")
+    namesrv=$new_domain_name_servers
+    hostname=$new_host_name
+    [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+    [ -n "$new_max_life" ] && lease_time=$new_max_life
+    preferred_lft=$lease_time
+    [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+
+    [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
+
+    ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
+        dev ${netif} scope global \
+        ${lease_time:+valid_lft $lease_time} \
+        ${preferred_lft:+preferred_lft ${preferred_lft}}
+
+    if getargbool 1 rd.peerdns; then
+        [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
+        if  [ -n "$namesrv" ] ; then
+            for s in $namesrv; do
+                echo nameserver $s
+            done
+        fi >> /tmp/net.$netif.resolv.conf
+    fi
+
+    # Note: hostname can be fqdn OR short hostname, so chop off any
+    # trailing domain name and explicity add any domain if set.
+    [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+}
+
+parse_option_121() {
+    while [ $# -ne 0 ]; do
+        mask="$1"
+        shift
+
+        # Is the destination a multicast group?
+        if [ $1 -ge 224 -a $1 -lt 240 ]; then
+            multicast=1
+        else
+            multicast=0
+        fi
+
+        # Parse the arguments into a CIDR net/mask string
+        if [ $mask -gt 24 ]; then
+            destination="$1.$2.$3.$4/$mask"
+            shift; shift; shift; shift
+        elif [ $mask -gt 16 ]; then
+            destination="$1.$2.$3.0/$mask"
+            shift; shift; shift
+        elif [ $mask -gt 8 ]; then
+            destination="$1.$2.0.0/$mask"
+            shift; shift
+        else
+            destination="$1.0.0.0/$mask"
+            shift
+        fi
+
+        # Read the gateway
+        gateway="$1.$2.$3.$4"
+        shift; shift; shift; shift
+
+        # Multicast routing on Linux
+        #  - If you set a next-hop address for a multicast group, this breaks with Cisco switches
+        #  - If you simply leave it link-local and attach it to an interface, it works fine.
+        if [ $multicast -eq 1 ]; then
+            temp_result="$destination dev $interface"
+        else
+            temp_result="$destination via $gateway dev $interface"
+        fi
+
+        echo "/sbin/ip route add $temp_result"
+    done
+}
+
+
+case $reason in
+    PREINIT)
+        echo "dhcp: PREINIT $netif up"
+        linkup $netif
+        ;;
+
+    PREINIT6)
+        echo "dhcp: PREINIT6 $netif up"
+        linkup $netif
+        wait_for_ipv6_dad_link $netif
+        ;;
+
+    BOUND)
+        echo "dhcp: BOND setting $netif"
+        unset layer2
+        if [ -f /sys/class/net/$netif/device/layer2 ]; then
+            read layer2 < /sys/class/net/$netif/device/layer2
+        fi
+        if [ "$layer2" != "0" ]; then
+            if command -v arping2 >/dev/null; then
+                if arping2 -q -C 1 -c 2 -I $netif -0 $new_ip_address ; then
+                    warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
+                    exit 1
+                fi
+            else
+                if ! arping -f -q -D -c 2 -I $netif $new_ip_address ; then
+                    warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
+                    exit 1
+                fi
+            fi
+        fi
+        unset layer2
+        setup_interface
+        set | while read line || [ -n "$line" ]; do
+            [ "${line#new_}" = "$line" ] && continue
+            echo "$line"
+        done >/tmp/dhcpcd.$netif.dhcpopts
+
+        {
+            echo '. /lib/net-lib.sh'
+            echo "setup_net $netif"
+            if [ -n "$new_classless_static_routes" ]; then
+                OLDIFS="$IFS"
+                IFS=".$IFS"
+                parse_option_121 $new_classless_static_routes
+                IFS="$OLDIFS"
+            fi
+            echo "source_hook initqueue/online $netif"
+            [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
+            echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
+        } > $hookdir/initqueue/setup_net_$netif.sh
+
+        echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhcpcd-$netif.sh
+        >/tmp/net.$netif.up
+        if [ -e /sys/class/net/${netif}/address ]; then
+            > /tmp/net.$(cat /sys/class/net/${netif}/address).up
+        fi
+
+        ;;
+
+    RENEW|REBIND)
+        unset lease_time
+        [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+        [ -n "$new_max_life" ] && lease_time=$new_max_life
+        preferred_lft=$lease_time
+        [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+        ip -4 addr change ${new_ip_address}/${new_subnet_mask} broadcast ${new_broadcast_address} dev ${interface} \
+           ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
+           >/dev/null 2>&1
+        ;;
+
+    BOUND6)
+        echo "dhcp: BOND6 setting $netif"
+        setup_interface6
+
+        set | while read line || [ -n "$line" ]; do
+            [ "${line#new_}" = "$line" ] && continue
+            echo "$line"
+        done >/tmp/dhcpcd.$netif.dhcpopts
+
+        {
+            echo '. /lib/net-lib.sh'
+            echo "setup_net $netif"
+            echo "source_hook initqueue/online $netif"
+            [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
+            echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
+        } > $hookdir/initqueue/setup_net_$netif.sh
+
+        echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhcpcd-$netif.sh
+        >/tmp/net.$netif.up
+        if [ -e /sys/class/net/${netif}/address ]; then
+            > /tmp/net.$(cat /sys/class/net/${netif}/address).up
+        fi
+        ;;
+
+    RENEW6|REBIND6)
+        unset lease_time
+        [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+        [ -n "$new_max_life" ] && lease_time=$new_max_life
+        preferred_lft=$lease_time
+        [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+        ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} dev ${interface} scope global \
+           ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
+           >/dev/null 2>&1
+        ;;
+
+    *) echo "dhcp: $reason";;
+esac
+
+exit 0
diff -Naur dracut-059/modules.d/35network-legacy/ifup.sh dracut-059-udhcpd/modules.d/35network-legacy/ifup.sh
--- dracut-059/modules.d/35network-legacy/ifup.sh	2022-12-24 17:49:27.000000000 +0100
+++ dracut-059-udhcpd/modules.d/35network-legacy/ifup.sh	2023-07-27 11:54:32.885363381 +0200
@@ -10,6 +10,23 @@
 type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
 type ip_to_var > /dev/null 2>&1 || . /lib/net-lib.sh
 
+# load magellan settings
+[ -f /etc/conf.d/network ] && . /etc/conf.d/network
+# some sane defaults
+if [[ -n $DEFAULT_DHCP_PROG ]]
+then
+	DHCP_PROG="$DEFAULT_DHCP_PROG"
+else
+	DHCP_PROG="/sbin/dhcpcd"
+fi
+if [[ -n $DEFAULT_DHCP_START ]]
+then
+	DHCP_START="$DEFAULT_DHCP_START"
+else
+	DHCP_START="-t 10"
+fi
+DHCP_PROG_NAME="${DHCP_PROG##*/}"
+
 # Huh? No $1?
 [ -z "$1" ] && exit 1
 
@@ -54,6 +71,9 @@
 
 # Run dhclient
 do_dhcp() {
+    local opts
+    local timeoutswitch
+
     # dhclient-script will mark the netif up and generate the online
     # event for nfsroot
     # XXX add -V vendor class and option parsing per kernel
@@ -86,21 +106,37 @@
         echo 'dhcp=dhclient' >> /run/NetworkManager/conf.d/10-dracut-dhclient.conf
     fi
 
+    case ${DHCP_PROG_NAME} in
+        dhclient)
+            opts="$@ -1 -q"
+            opts+=" -cf /etc/dhclient.conf"
+            opts+=" -pf /tmp/${DHCP_PROG_NAME}.${netif}.pid"
+            opts+=" -lf /tmp/${DHCP_PROG_NAME}.${netif}.lease"
+            timeoutswitch="-timeout"
+            ;;
+
+        dhcpcd)
+            opts="$@ -q"
+            timeoutswitch="--timeout"
+            ;;
+
+        udhcpc)
+            opts="-q"
+            opts+=" -p /tmp/${DHCP_PROG_NAME}.${netif}.pid"
+            timeoutswitch="--timeout"
+            ;;
+    esac
+
     while [ "$_COUNT" -lt "$_DHCPRETRY" ]; do
-        info "Starting dhcp for interface $netif"
-        dhclient "$@" \
-            ${_timeout:+--timeout "$_timeout"} \
-            -q \
-            -1 \
-            -cf /etc/dhclient.conf \
-            -pf "/tmp/dhclient.${netif}.pid" \
-            -lf "/tmp/dhclient.${netif}.lease" \
-            "$netif" \
+        info "Starting dhcp (${DHCP_PROG_NAME}) for interface $netif"
+        ${DHCP_PROG} ${opts} \
+                 ${_timeout:+${timeoutswitch} "$_timeout"} \
+                 ${DHCP_START} ${netif} \
             && return 0
         _COUNT=$((_COUNT + 1))
         [ "$_COUNT" -lt "$_DHCPRETRY" ] && sleep 1
     done
-    warn "dhcp for interface $netif failed"
+    warn "dhcp (${DHCP_PROG_NAME}) for interface ${netif} failed"
     # nuke those files since we failed; we might retry dhcp again if it's e.g.
     # `ip=dhcp,dhcp6` and we check for the PID file at the top
     rm -f /tmp/dhclient."$netif".pid /tmp/dhclient."$netif".lease
diff -Naur dracut-059/modules.d/35network-legacy/kill-dhcpcd.sh dracut-059-udhcpd/modules.d/35network-legacy/kill-dhcpcd.sh
--- dracut-059/modules.d/35network-legacy/kill-dhcpcd.sh	1970-01-01 01:00:00.000000000 +0100
+++ dracut-059-udhcpd/modules.d/35network-legacy/kill-dhcpcd.sh	2023-07-27 11:55:18.002800244 +0200
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for f in /tmp/dhcpcd.*.pid; do
+    [ -e $f ] || continue
+    read PID < $f;
+    kill $PID >/dev/null 2>&1
+done
+
+sleep 0.1
+
+for f in /tmp/dhcpcd.*.pid; do
+    [ -e $f ] || continue
+    read PID < $f;
+    kill -9 $PID >/dev/null 2>&1
+done
+
diff -Naur dracut-059/modules.d/35network-legacy/kill-udhcpc.sh dracut-059-udhcpd/modules.d/35network-legacy/kill-udhcpc.sh
--- dracut-059/modules.d/35network-legacy/kill-udhcpc.sh	1970-01-01 01:00:00.000000000 +0100
+++ dracut-059-udhcpd/modules.d/35network-legacy/kill-udhcpc.sh	2023-07-27 11:59:48.994092784 +0200
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+for f in /tmp/udhcpc.*.pid; do
+    [ -e $f ] || continue
+    read PID < $f;
+    kill $PID >/dev/null 2>&1
+done
+
+sleep 0.1
+
+for f in /tmp/udhcpc.*.pid; do
+    [ -e $f ] || continue
+    read PID < $f;
+    kill -9 $PID >/dev/null 2>&1
+done
diff -Naur dracut-059/modules.d/35network-legacy/module-setup.sh dracut-059-udhcpd/modules.d/35network-legacy/module-setup.sh
--- dracut-059/modules.d/35network-legacy/module-setup.sh	2022-12-24 17:49:27.000000000 +0100
+++ dracut-059-udhcpd/modules.d/35network-legacy/module-setup.sh	2023-07-27 12:09:16.600483707 +0200
@@ -2,7 +2,9 @@
 
 # called by dracut
 check() {
-    require_binaries ip dhclient sed awk grep pgrep tr expr || return 1
+    . /etc/conf.d/network
+
+    require_binaries ip ifconfig route $DEFAULT_DHCP_PROG sed awk grep pgrep tr expr || return 1
     require_any_binary arping arping2 || return 1
 
     return 255
@@ -21,6 +23,10 @@
 # called by dracut
 install() {
     local _arch
+    local _dhcp_prog_name
+    local _file
+    . /etc/conf.d/network
+    _dhcp_prog_name="${DEFAULT_DHCP_PROG##*/}"
 
     #Adding default link
     if dracut_module_included "systemd"; then
@@ -28,7 +34,8 @@
         [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
     fi
 
-    inst_multiple ip dhclient sed awk grep pgrep tr expr
+    inst_multiple ip $_dhcp_prog_name sed awk grep pgrep tr expr
+    inst_multiple ifconfig route
 
     inst_multiple -o arping arping2
     strstr "$(arping 2>&1)" "ARPing 2" && mv "$initdir/bin/arping" "$initdir/bin/arping2"
@@ -37,10 +44,6 @@
     inst_multiple -o teamd teamdctl teamnl
     inst_simple /etc/libnl/classid
     inst_script "$moddir/ifup.sh" "/sbin/ifup"
-    inst_script "$moddir/dhcp-multi.sh" "/sbin/dhcp-multi.sh"
-    inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
-    inst_simple -H "/etc/dhclient.conf"
-    cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
     inst_hook pre-udev 60 "$moddir/net-genrules.sh"
     inst_hook cmdline 92 "$moddir/parse-ibft.sh"
     inst_hook cmdline 95 "$moddir/parse-vlan.sh"
@@ -49,7 +52,32 @@
     inst_hook cmdline 97 "$moddir/parse-bridge.sh"
     inst_hook cmdline 98 "$moddir/parse-ip-opts.sh"
     inst_hook cmdline 99 "$moddir/parse-ifname.sh"
-    inst_hook cleanup 10 "$moddir/kill-dhclient.sh"
+
+    case $_dhcp_prog_name in
+        dhclient)
+            inst_script "$moddir/dhcp-multi.sh" "/sbin/dhcp-multi.sh"
+            inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
+            inst_simple -H "/etc/dhclient.conf"
+            cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
+            inst_hook cleanup 10 "$moddir/kill-dhclient.sh"
+            ;;
+
+        udhcpc)
+            inst_script "$moddir/udhcpc-script.sh" "/usr/share/udhcpc/default.script"
+            inst_hook cleanup 10 "$moddir/kill-udhcpc.sh"
+            ;;
+
+        dhcpcd)
+            inst_simple "/etc/dhcpcd.conf"
+            inst_script -o /usr/lib/dhcpcd/dhcpcd-run-hooks
+            for _file in $(find /usr/lib/dhcpcd/dhcpcd-hooks -type f); do
+                inst_simple -o $_file
+            done
+            inst_simple "$moddir/dhcpcd-script.sh" "/usr/lib/dhcpcd/dhcpcd-hooks/90-netroot"
+            inst_hook cleanup 10 "$moddir/kill-dhcpcd.sh"
+            ;;
+    esac
+    inst_simple /etc/conf.d/network
 
     # install all config files for teaming
     unset TEAM_MASTER
diff -Naur dracut-059/modules.d/35network-legacy/udhcpc-script.sh dracut-059-udhcpd/modules.d/35network-legacy/udhcpc-script.sh
--- dracut-059/modules.d/35network-legacy/udhcpc-script.sh	1970-01-01 01:00:00.000000000 +0100
+++ dracut-059-udhcpd/modules.d/35network-legacy/udhcpc-script.sh	2023-07-27 12:11:54.013191653 +0200
@@ -0,0 +1,282 @@
+#!/bin/sh
+
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
+type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
+
+# We already need a set netif here
+netif=$interface
+
+# setup udhcp environment variables
+reason=$1
+new_ip_address="$ip"
+new_interface_mtu="$mtu"
+new_subnet_mask="$mask"
+new_broadcast_address="$broadcast"
+new_routers="$router"
+new_domain_name="$domain"
+new_domain_search=""
+new_domain_name_servers="$dns"
+new_host_name="$hostname"
+new_dhcp_lease_time="$lease"
+new_max_life=""
+new_preferred_life=""
+
+setup_interface() {
+    ip=$new_ip_address
+    mtu=$new_interface_mtu
+    mask=$new_subnet_mask
+    bcast=$new_broadcast_address
+    gw=${new_routers%%,*}
+    domain=$new_domain_name
+    search=$(printf -- "$new_domain_search")
+    namesrv=$new_domain_name_servers
+    hostname=$new_host_name
+    [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+    [ -n "$new_max_life" ] && lease_time=$new_max_life
+    preferred_lft=$lease_time
+    [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+
+    [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
+
+    # Taken from debian dhclient-script:
+    # The 576 MTU is only used for X.25 and dialup connections
+    # where the admin wants low latency.  Such a low MTU can cause
+    # problems with UDP traffic, among other things.  As such,
+    # disallow MTUs from 576 and below by default, so that broken
+    # MTUs are ignored, but higher stuff is allowed (1492, 1500, etc).
+    if [ -n "$mtu" ] && [ $mtu -gt 576 ] ; then
+        if ! ip link set $netif mtu $mtu ; then
+            ip link set $netif down
+            ip link set $netif mtu $mtu
+            linkup $netif
+        fi
+    fi
+
+# lease time stuff not compatible with busybox ip command
+#    ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif \
+#        ${lease_time:+valid_lft $lease_time} \
+#        ${preferred_lft:+preferred_lft ${preferred_lft}}
+    ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif
+
+    if [ -n "$gw" ] ; then
+        if [ "$mask" = "255.255.255.255" ] ; then
+            # point-to-point connection => set explicit route to gateway
+            echo ip route add $gw dev $netif > /tmp/net.$netif.gw
+        fi
+
+        echo "$gw" | {
+            IFS=' ' read -r main_gw other_gw
+            echo ip route replace default via $main_gw dev $netif >> /tmp/net.$netif.gw
+            if [ -n "$other_gw" ] ; then
+                for g in $other_gw; do
+                    echo ip route add default via $g dev $netif >> /tmp/net.$netif.gw
+                done
+            fi
+        }
+    fi
+
+    if getargbool 1 rd.peerdns; then
+        [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
+        if  [ -n "$namesrv" ] ; then
+            for s in $namesrv; do
+                echo nameserver $s
+            done
+        fi >> /tmp/net.$netif.resolv.conf
+    fi
+    # Note: hostname can be fqdn OR short hostname, so chop off any
+    # trailing domain name and explicity add any domain if set.
+    [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+}
+
+setup_interface6() {
+    domain=$new_domain_name
+    search=$(printf -- "$new_domain_search")
+    namesrv=$new_domain_name_servers
+    hostname=$new_host_name
+    [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+    [ -n "$new_max_life" ] && lease_time=$new_max_life
+    preferred_lft=$lease_time
+    [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+
+    [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
+
+# lease time stuff not compatible with busybox ip command
+#    ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
+#        dev ${netif} scope global \
+#        ${lease_time:+valid_lft $lease_time} \
+#        ${preferred_lft:+preferred_lft ${preferred_lft}}
+    ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
+        dev ${netif} scope global
+
+    if getargbool 1 rd.peerdns; then
+        [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
+        if  [ -n "$namesrv" ] ; then
+            for s in $namesrv; do
+                echo nameserver $s
+            done
+        fi >> /tmp/net.$netif.resolv.conf
+    fi
+
+    # Note: hostname can be fqdn OR short hostname, so chop off any
+    # trailing domain name and explicity add any domain if set.
+    [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+}
+
+parse_option_121() {
+    while [ $# -ne 0 ]; do
+        mask="$1"
+        shift
+
+        # Is the destination a multicast group?
+        if [ $1 -ge 224 -a $1 -lt 240 ]; then
+            multicast=1
+        else
+            multicast=0
+        fi
+
+        # Parse the arguments into a CIDR net/mask string
+        if [ $mask -gt 24 ]; then
+            destination="$1.$2.$3.$4/$mask"
+            shift; shift; shift; shift
+        elif [ $mask -gt 16 ]; then
+            destination="$1.$2.$3.0/$mask"
+            shift; shift; shift
+        elif [ $mask -gt 8 ]; then
+            destination="$1.$2.0.0/$mask"
+            shift; shift
+        else
+            destination="$1.0.0.0/$mask"
+            shift
+        fi
+
+        # Read the gateway
+        gateway="$1.$2.$3.$4"
+        shift; shift; shift; shift
+
+        # Multicast routing on Linux
+        #  - If you set a next-hop address for a multicast group, this breaks with Cisco switches
+        #  - If you simply leave it link-local and attach it to an interface, it works fine.
+        if [ $multicast -eq 1 ]; then
+            temp_result="$destination dev $interface"
+        else
+            temp_result="$destination via $gateway dev $interface"
+        fi
+
+        echo "/sbin/ip route add $temp_result"
+    done
+}
+
+
+case $reason in
+    PREINIT|preinit)
+        echo "dhcp: PREINIT $netif up"
+        linkup $netif
+        ;;
+
+    PREINIT6|preinit6)
+        echo "dhcp: PREINIT6 $netif up"
+        linkup $netif
+        wait_for_ipv6_dad_link $netif
+        ;;
+
+    BOUND|bound)
+        echo "dhcp: BOND setting $netif"
+        unset layer2
+        if [ -f /sys/class/net/$netif/device/layer2 ]; then
+            read layer2 < /sys/class/net/$netif/device/layer2
+        fi
+        if [ "$layer2" != "0" ]; then
+            if command -v arping2 >/dev/null; then
+                if arping2 -q -C 1 -c 2 -I $netif -0 $new_ip_address ; then
+                    warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
+                    exit 1
+                fi
+            else
+                if ! arping -f -q -D -c 2 -I $netif $new_ip_address ; then
+                    warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
+                    exit 1
+                fi
+            fi
+        fi
+        unset layer2
+        setup_interface
+        set | while read line || [ -n "$line" ]; do
+            [ "${line#new_}" = "$line" ] && continue
+            echo "$line"
+        done >/tmp/udhcpc.$netif.dhcpopts
+
+        {
+            echo '. /lib/net-lib.sh'
+            echo "setup_net $netif"
+            if [ -n "$new_classless_static_routes" ]; then
+                OLDIFS="$IFS"
+                IFS=".$IFS"
+                parse_option_121 $new_classless_static_routes
+                IFS="$OLDIFS"
+            fi
+            echo "source_hook initqueue/online $netif"
+            [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
+            echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
+        } > $hookdir/initqueue/setup_net_$netif.sh
+
+        echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/udhcpc-$netif.sh
+        >/tmp/net.$netif.up
+        if [ -e /sys/class/net/${netif}/address ]; then
+            > /tmp/net.$(cat /sys/class/net/${netif}/address).up
+        fi
+
+        ;;
+
+    RENEW|renew|REBIND|rebind)
+        unset lease_time
+        [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+        [ -n "$new_max_life" ] && lease_time=$new_max_life
+        preferred_lft=$lease_time
+        [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+        ip -4 addr change ${new_ip_address}/${new_subnet_mask} broadcast ${new_broadcast_address} dev ${interface} \
+           ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
+           >/dev/null 2>&1
+        ;;
+
+    BOUND6|bound6)
+        echo "dhcp: BOND6 setting $netif"
+        setup_interface6
+
+        set | while read line || [ -n "$line" ]; do
+            [ "${line#new_}" = "$line" ] && continue
+            echo "$line"
+        done >/tmp/udhcpc.$netif.dhcpopts
+
+        {
+            echo '. /lib/net-lib.sh'
+            echo "setup_net $netif"
+            echo "source_hook initqueue/online $netif"
+            [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
+            echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
+        } > $hookdir/initqueue/setup_net_$netif.sh
+
+        echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/udhcpc-$netif.sh
+        >/tmp/net.$netif.up
+        if [ -e /sys/class/net/${netif}/address ]; then
+            > /tmp/net.$(cat /sys/class/net/${netif}/address).up
+        fi
+        ;;
+
+    RENEW6|renew6|REBIND6|rebind6)
+        unset lease_time
+        [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
+        [ -n "$new_max_life" ] && lease_time=$new_max_life
+        preferred_lft=$lease_time
+        [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
+        ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} dev ${interface} scope global \
+           ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
+           >/dev/null 2>&1
+        ;;
+
+    *) echo "dhcp: $reason";;
+esac
+
+exit 0
+
diff -Naur dracut-059/modules.d/40network/net-lib.sh dracut-059-udhcpd/modules.d/40network/net-lib.sh
--- dracut-059/modules.d/40network/net-lib.sh	2022-12-24 17:49:27.000000000 +0100
+++ dracut-059-udhcpd/modules.d/40network/net-lib.sh	2023-07-27 12:15:48.930558389 +0200
@@ -137,6 +137,8 @@
     [ -e /tmp/net."$netif".override ] && . /tmp/net."$netif".override
     # shellcheck disable=SC1090
     [ -e /tmp/dhclient."$netif".dhcpopts ] && . /tmp/dhclient."$netif".dhcpopts
+    [ -e /tmp/udhcpc."$netif".dhcpopts ] && . /tmp/udhcpc."$netif".dhcpopts
+    [ -e /tmp/dhcpcd."$netif".dhcpopts ] && . /tmp/dhcpcd."$netif".dhcpopts
     # set up resolv.conf
     [ -e /tmp/net."$netif".resolv.conf ] \
         && awk '!array[$0]++' /tmp/net."$netif".resolv.conf > /etc/resolv.conf
@@ -215,6 +217,12 @@
         for f in "/tmp/dhclient.$i."*; do
             [ -f "$f" ] && cp -f "$f" /tmp/net."${f#/tmp/dhclient.}"
         done
+        for f in "/tmp/udhcpc.$i."*; do
+            [ -f "$f" ] && cp -f "$f" /tmp/net."${f#/tmp/udhcpc.}"
+        done
+        for f in "/tmp/dhcpcd.$i."*; do
+            [ -f "$f" ] && cp -f "$f" /tmp/net."${f#/tmp/dhcpcd.}"
+        done
     done
     echo "$IFACES" > /tmp/.net.ifaces.new
     mv /tmp/.net.ifaces.new /tmp/net.ifaces
diff -Naur dracut-059/modules.d/40network/netroot.sh dracut-059-udhcpd/modules.d/40network/netroot.sh
--- dracut-059/modules.d/40network/netroot.sh	2022-12-24 17:49:27.000000000 +0100
+++ dracut-059-udhcpd/modules.d/40network/netroot.sh	2023-07-27 12:16:37.778062865 +0200
@@ -42,6 +42,8 @@
         # Load dhcp options
         # shellcheck disable=SC1090
         [ -e /tmp/dhclient."$netif".dhcpopts ] && . /tmp/dhclient."$netif".dhcpopts
+        [ -e /tmp/dhcpcd."$netif".dhcpopts ] && . /tmp/dhcpcd."$netif".dhcpopts
+        [ -e /tmp/udhcpc."$netif".dhcpopts ] && . /tmp/udhcpc."$netif".dhcpopts
 
         # If we have a specific bootdev with no dhcpoptions or empty root-path,
         # we die. Otherwise we just warn
