/mandos/trunk

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

« back to all changes in this revision

Viewing changes to network-hooks.d/bridge

  • Committer: teddy at recompile
  • Date: 2011-12-27 03:56:39 UTC
  • mto: This revision was merged to the branch mainline in revision 541.
  • Revision ID: teddy@recompile.se-20111227035639-hvvgrqchckawlg02
Add wireless network hook

* network-hooks.s/bridge: Use canonical syntax for "ip" command.
* network-hooks.s/wireless: New.
* network-hooks.s/wireless.conf: - '' -
* plugins.d/mandos-client.c (run_network_hooks): Add new "CONNECT"
                                                 environment variable.
* plugins.d/mandos-client.xml (NETWORK HOOKS/REQUIREMENTS): Document
                                                            "CONNECT"
                                                            environment
                                                            variable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        "$brctl" addbr "$BRIDGE"
42
42
        for port in $PORTS; do
43
43
            "$brctl" addif "$BRIDGE" "$port"
44
 
            ip link set up "$port"
 
44
            ip link set dev "$port" up
45
45
        done
46
 
        ip link set up "$BRIDGE"
 
46
        ip link set dev "$BRIDGE" up
47
47
        sleep "$DELAY"
48
48
        if [ -n "$IPADDRS" ]; then
49
49
            for ipaddr in $IPADDRS; do
57
57
        fi
58
58
        ;;
59
59
    stop)
60
 
        ip link set down "$BRIDGE"
 
60
        ip link set dev "$BRIDGE" down
61
61
        for port in $PORTS; do
62
 
            ip link set down "$port"
 
62
            ip link set dev "$port" down
63
63
            "$brctl" delif "$BRIDGE" "$port"
64
64
        done
65
65
        "$brctl" delbr "$BRIDGE"