/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to network-hooks.d/bridge

Added sample OpenVPN network hook.

* network-hooks.d/openvpn: New.
* network-hooks.d/openvpn.conf: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
case "$1" in
40
40
    start)
41
 
        /usr/sbin/brctl addbr "$BRIDGE"
 
41
        "$brctl" addbr "$BRIDGE"
42
42
        for port in $PORTS; do
43
 
            /usr/sbin/brctl addif "$BRIDGE" "$port"
 
43
            "$brctl" addif "$BRIDGE" "$port"
 
44
            ip link set up "$port"
44
45
        done
45
46
        ip link set up "$BRIDGE"
 
47
        sleep "$DELAY"
46
48
        if [ -n "$IPADDRS" ]; then
47
49
            for ipaddr in $IPADDRS; do
48
50
                ip addr add "$ipaddr" dev "$BRIDGE"
57
59
    stop)
58
60
        ip link set down "$BRIDGE"
59
61
        for port in $PORTS; do
60
 
            /usr/sbin/brctl delif "$BRIDGE" "$port"
 
62
            ip link set down "$port"
 
63
            "$brctl" delif "$BRIDGE" "$port"
61
64
        done
62
 
        /usr/sbin/brctl delbr "$BRIDGE"
 
65
        "$brctl" delbr "$BRIDGE"
63
66
        ;;
64
67
    files)
65
68
        echo /bin/ip