p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/dracut/modules.d/40network/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /lib/dracut/modules.d/40network/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 mwke 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
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
December 20 2023 04:36:31
0 / 0
0755
dhclient-script.sh
8.318 KB
September 30 2020 15:57:46
0 / 0
0755
dhclient.conf
0.256 KB
September 30 2020 15:57:50
0 / 0
0644
dhcp-root.sh
0.904 KB
September 12 2013 12:52:20
0 / 0
0755
ifname-genrules.sh
1.2 KB
September 12 2013 12:52:20
0 / 0
0755
ifup.sh
13.601 KB
September 30 2020 15:57:51
0 / 0
0755
kill-dhclient.sh
0.354 KB
September 12 2013 12:52:20
0 / 0
0755
module-setup.sh
4.717 KB
September 30 2020 15:57:51
0 / 0
0755
net-genrules.sh
3.668 KB
September 30 2020 15:57:48
0 / 0
0755
net-lib.sh
24.127 KB
September 30 2020 15:57:51
0 / 0
0755
netroot.sh
2.724 KB
September 30 2020 15:57:40
0 / 0
0755
parse-bond.sh
1.961 KB
September 30 2020 15:57:48
0 / 0
0755
parse-bridge.sh
1.098 KB
September 30 2020 15:57:45
0 / 0
0755
parse-ibft.sh
0.384 KB
September 30 2020 15:57:40
0 / 0
0755
parse-ifname.sh
0.646 KB
September 12 2013 12:52:20
0 / 0
0755
parse-ip-opts.sh
4.797 KB
September 30 2020 15:57:49
0 / 0
0755
parse-team.sh
0.96 KB
September 30 2020 15:57:45
0 / 0
0755
parse-vlan.sh
0.52 KB
September 30 2020 15:57:45
0 / 0
0755