GRAYBYTE WORDPRESS FILE MANAGER4412

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/dracut/modules.d/35network-legacy/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current 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

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
April 06 2024 13:22:13
root / root
0755
dhclient-script.sh
9.154 KB
April 06 2024 13:22:06
root / root
0755
dhclient.conf
0.296 KB
October 08 2018 13:38:33
root / root
0644
ifup.sh
15.179 KB
April 06 2024 13:22:07
root / root
0755
kill-dhclient.sh
0.246 KB
October 08 2018 13:38:33
root / root
0755
module-setup.sh
2.813 KB
April 06 2024 13:22:06
root / root
0755
net-genrules.sh
4.013 KB
April 06 2024 13:22:07
root / root
0755
parse-bond.sh
1.96 KB
October 08 2018 13:38:33
root / root
0755
parse-bridge.sh
1.098 KB
October 08 2018 13:38:33
root / root
0755
parse-ibft.sh
0.276 KB
October 08 2018 13:38:33
root / root
0755
parse-ifname.sh
0.539 KB
October 08 2018 13:38:33
root / root
0755
parse-ip-opts.sh
4.834 KB
April 06 2024 13:22:07
root / root
0755
parse-team.sh
1.563 KB
April 06 2024 13:22:06
root / root
0755
parse-vlan.sh
0.646 KB
October 08 2018 13:38:33
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF