SILENT KILLERPanel

Current Path: > > lib > dracut > modules.d > 35network-legacy


Operation   : Linux premium88.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Software     : Apache
Server IP    : 185.61.154.216 | Your IP: 216.73.216.44
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/dracut/modules.d/35network-legacy

NameTypeSizeLast ModifiedActions
dhclient-script.sh File 9374 bytes July 15 2025 09:09:21.
dhclient.conf File 303 bytes October 08 2018 13:38:33.
ifup.sh File 15543 bytes July 15 2025 09:09:22.
kill-dhclient.sh File 252 bytes October 08 2018 13:38:33.
module-setup.sh File 2880 bytes July 15 2025 09:09:21.
net-genrules.sh File 4109 bytes July 15 2025 09:09:23.
parse-bond.sh File 2007 bytes October 08 2018 13:38:33.
parse-bridge.sh File 1124 bytes October 08 2018 13:38:33.
parse-ibft.sh File 283 bytes October 08 2018 13:38:33.
parse-ifname.sh File 552 bytes October 08 2018 13:38:33.
parse-ip-opts.sh File 4950 bytes July 15 2025 09:09:22.
parse-team.sh File 1600 bytes July 15 2025 09:09:21.
parse-vlan.sh File 662 bytes October 08 2018 13:38:33.

Reading File: //lib/dracut/modules.d/35network-legacy/parse-bond.sh

#!/bin/sh
#
# Format:
#       bond=<bondname>[:<bondslaves>[:<options>[:<mtu>]]]
#
#       bondslaves is a comma-separated list of physical (ethernet) interfaces
#       options is a comma-separated list on bonding options (modinfo bonding for details) in format compatible with initscripts
#       if options include multi-valued arp_ip_target option, then its values should be separated by semicolon.
#
#       bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
#
#       if the mtu is specified, it will be set on the bond master
#

# We translate list of slaves to space-separated here to make it easier to loop over them in ifup
# Ditto for bonding options
parsebond() {
    local v=${1}:
    set --
    while [ -n "$v" ]; do
        set -- "$@" "${v%%:*}"
        v=${v#*:}
    done

    case $# in
    0)  bondname=bond0; bondslaves="eth0 eth1" ;;
    1)  bondname=$1; bondslaves="eth0 eth1" ;;
    2)  bondname=$1; bondslaves=$(str_replace "$2" "," " ") ;;
    3)  bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " ") ;;
    4)  bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " "); bondmtu=$4;;
    *)  die "bond= requires zero to four parameters" ;;
    esac
}

# Parse bond for bondname, bondslaves, bondmode, bondoptions and bondmtu
for bond in $(getargs bond=); do
    unset bondname
    unset bondslaves
    unset bondoptions
    unset bondmtu
    if [ "$bond" != "bond" ]; then
        parsebond "$bond"
    fi
    # Simple default bond
    if [ -z "$bondname" ]; then
        bondname=bond0
        bondslaves="eth0 eth1"
    fi
    # Make it suitable for initscripts export
    bondoptions=$(str_replace "$bondoptions" ";" ",")
    echo "bondname=$bondname" > /tmp/bond.${bondname}.info
    echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info
    echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info
    echo "bondmtu=\"$bondmtu\"" >> /tmp/bond.${bondname}.info
done

SILENT KILLER Tool