/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 bsnet
  • Date: 2011-12-24 23:17:02 UTC
  • Revision ID: teddy@fukt.bsnet.se-20111224231702-1ffgu6r02p0bz9co
* plugins.d/splashy.c (error_plus): Check format string.
* plugins.d/askpass-fifo.c (error_plus): - '' -
* plugins.d/plymouth.c (error_plus): - '' -
* plugins.d/password-prompt.c (error_plus): - '' -
* plugins.d/usplash.c (error_plus): - '' -

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