/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: Björn Påhlsson
  • Date: 2011-11-24 20:17:38 UTC
  • mfrom: (505.3.10 client-network-hooks)
  • mto: This revision was merged to the branch mainline in revision 525.
  • Revision ID: belorn@fukt.bsnet.se-20111124201738-tjjpqg75110ocwdt
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    exit
30
30
fi
31
31
 
32
 
for brctl in /sbin/brctl /usr/sbin/brctl; do
33
 
    if [ -e "$brctl" ]; then
34
 
        break
35
 
    fi
36
 
done
37
 
 
38
32
case "$1" in
39
33
    start)
40
 
        /usr/sbin/brctl addbr "$BRIDGE"
 
34
        brctl addbr "$BRIDGE"
41
35
        for port in $PORTS; do
42
 
            /usr/sbin/brctl addif "$BRIDGE" "$port"
 
36
            brctl addif "$BRIDGE" "$port"
43
37
        done
44
38
        ip link set up "$BRIDGE"
45
39
        if [ -n "$IPADDRS" ]; then
56
50
    stop)
57
51
        ip link set down "$BRIDGE"
58
52
        for port in $PORTS; do
59
 
            /usr/sbin/brctl delif "$BRIDGE" "$port"
 
53
            brctl delif "$BRIDGE" "$port"
60
54
        done
61
 
        /usr/sbin/brctl delbr "$BRIDGE"
 
55
        brctl delbr "$BRIDGE"
62
56
        ;;
63
57
    files)
64
58
        echo /bin/ip
65
 
        echo "$brctl"
66
 
        ;;
67
 
    modules)
68
 
        echo bridge
 
59
        echo /usr/bin/brctl
69
60
        ;;
70
61
esac