/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 b in /sbin/brctl /usr/sbin/brctl; do
33
 
    if [ -e "$b" ]; then
34
 
        brctl="$b"
 
32
for brctl in /sbin/brctl /usr/sbin/brctl; do
 
33
    if [ -e "$brctl" ]; then
35
34
        break
36
35
    fi
37
36
done
38
37
 
39
38
case "$1" in
40
39
    start)
41
 
        "$brctl" addbr "$BRIDGE"
 
40
        /usr/sbin/brctl addbr "$BRIDGE"
42
41
        for port in $PORTS; do
43
 
            "$brctl" addif "$BRIDGE" "$port"
44
 
            ip link set up "$port"
 
42
            /usr/sbin/brctl addif "$BRIDGE" "$port"
45
43
        done
46
44
        ip link set up "$BRIDGE"
47
 
        sleep "$DELAY"
48
45
        if [ -n "$IPADDRS" ]; then
49
46
            for ipaddr in $IPADDRS; do
50
47
                ip addr add "$ipaddr" dev "$BRIDGE"
59
56
    stop)
60
57
        ip link set down "$BRIDGE"
61
58
        for port in $PORTS; do
62
 
            ip link set down "$port"
63
 
            "$brctl" delif "$BRIDGE" "$port"
 
59
            /usr/sbin/brctl delif "$BRIDGE" "$port"
64
60
        done
65
 
        "$brctl" delbr "$BRIDGE"
 
61
        /usr/sbin/brctl delbr "$BRIDGE"
66
62
        ;;
67
63
    files)
68
64
        echo /bin/ip