|
@@ -8,6 +8,7 @@
|
|
PING=${PING:=ping}
|
|
PING=${PING:=ping}
|
|
PING6=${PING6:=ping6}
|
|
PING6=${PING6:=ping6}
|
|
MZ=${MZ:=mausezahn}
|
|
MZ=${MZ:=mausezahn}
|
|
|
|
+TEAMD=${TEAMD:=teamd}
|
|
WAIT_TIME=${WAIT_TIME:=5}
|
|
WAIT_TIME=${WAIT_TIME:=5}
|
|
PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no}
|
|
PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no}
|
|
PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no}
|
|
PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no}
|
|
@@ -425,6 +426,28 @@ vlan_destroy()
|
|
ip link del dev $name
|
|
ip link del dev $name
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+team_create()
|
|
|
|
+{
|
|
|
|
+ local if_name=$1; shift
|
|
|
|
+ local mode=$1; shift
|
|
|
|
+
|
|
|
|
+ require_command $TEAMD
|
|
|
|
+ $TEAMD -t $if_name -d -c '{"runner": {"name": "'$mode'"}}'
|
|
|
|
+ for slave in "$@"; do
|
|
|
|
+ ip link set dev $slave down
|
|
|
|
+ ip link set dev $slave master $if_name
|
|
|
|
+ ip link set dev $slave up
|
|
|
|
+ done
|
|
|
|
+ ip link set dev $if_name up
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+team_destroy()
|
|
|
|
+{
|
|
|
|
+ local if_name=$1; shift
|
|
|
|
+
|
|
|
|
+ $TEAMD -t $if_name -k
|
|
|
|
+}
|
|
|
|
+
|
|
master_name_get()
|
|
master_name_get()
|
|
{
|
|
{
|
|
local if_name=$1
|
|
local if_name=$1
|