/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

* network-hooks.d/bridge: Look for both /sbin/brctl and /usr/sbin/brctl.

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