bond 629 Bytes
Newer Older
1
# Contributed by: andy123 <ajs@online.de>
2
3
4

. "$SUBR_DIR/ip"

5
declare -ag BindsToInterfaces
6
7

bond_up() {
8
9
10
    if is_interface "$Interface"; then
        report_error "Interface '$Interface' already exists"
        return 1
11
    else
12
        interface_add bond "$Interface"
13
    fi
14
    bring_interface_up "$Interface"
15

16
    for slave in "${BindsToInterfaces[@]}"; do
17
        ip link set dev "$slave" master "$Interface"
18
19
    done

20
    ip_set
21
22
23
}

bond_down() {
24
    for slave in "${BindsToInterfaces[@]}"; do
25
        ip link set dev "$slave" nomaster
26
27
    done

28
    ip_unset
29
    interface_delete "$Interface"
30
31
32
}


Jouke Witteveen's avatar
Jouke Witteveen committed
33
# vim: ft=sh ts=4 et sw=4: