blob: 2909b907736b64c7dd2edde986a86ea834d555de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# Contributed by: andy123 <ajs@online.de>
. "$SUBR_DIR/ip"
declare -ag BindsToInterfaces
bond_up() {
if is_interface "$Interface"; then
report_error "Interface '$Interface' already exists"
return 1
else
interface_add bond "$Interface"
fi
bring_interface_up "$Interface"
for slave in "${BindsToInterfaces[@]}"; do
ip link set dev "$slave" master "$Interface"
done
ip_set
}
bond_down() {
for slave in "${BindsToInterfaces[@]}"; do
ip link set dev "$slave" nomaster
done
ip_unset
interface_delete "$Interface"
}
# vim: ft=sh ts=4 et sw=4:
|