KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib/dracut/modules.d/40network/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/dracut/modules.d/40network/parse-team.sh
#!/bin/sh
#
# Format:
#       team=<teammaster>:<teamslaves>
#
#       teamslaves is a comma-separated list of physical (ethernet) interfaces
#

parseteam() {
    local v=${1}:
    set --
    while [ -n "$v" ]; do
        set -- "$@" "${v%%:*}"
        v=${v#*:}
    done

    case $# in
    2)  teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;;
    *)  die "team= requires two parameters" ;;
    esac
}


for team in $(getargs team=); do
    unset teammaster teamslaves
    parseteam "$(getarg team=)"

    echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info
    echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info
    if ! [ -e /etc/teamd/${teammaster}.conf ]; then
        warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup."
        mkdir -p /etc/teamd
        printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf"
    fi
done

Anon7 - 2021