/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 Hogeborn
  • Date: 2012-01-08 10:19:33 UTC
  • mto: (237.4.29 release)
  • mto: This revision was merged to the branch mainline in revision 554.
  • Revision ID: teddy@recompile.se-20120108101933-xbtodqgepxax8hn1
Tags: version-1.5.2-1
* Makefile (version): Changed to "1.5.2".
* NEWS (Version 1.5.2): New entry.
* debian/changelog (1.5.2-1): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
addrtoif(){
22
22
    grep -liFe "$1" /sys/class/net/*/address \
23
 
        | sed -e 's,.*/\([^/]*\)/[^/]*,\1,' -e "/^${BRIDGE}\$/d"
 
23
        | sed -e 's,.*/\([^/]*\)/[^/]*,\1,'
24
24
}
25
25
 
26
26
# Read config file, which must set "BRIDGE", "PORT_ADDRESSES", and
37
37
    exit
38
38
fi
39
39
 
40
 
brctl="/sbin/brctl"
41
 
for b in "$brctl" /usr/sbin/brctl; do
 
40
for b in /sbin/brctl /usr/sbin/brctl; do
42
41
    if [ -e "$b" ]; then
43
42
        brctl="$b"
44
43
        break
54
53
            ip link set dev "$interface" up
55
54
        done
56
55
        ip link set dev "$BRIDGE" up
57
 
        sleep "${DELAY%%.*}"
 
56
        sleep "$DELAY"
58
57
        if [ -n "$IPADDRS" ]; then
59
58
            for ipaddr in $IPADDRS; do
60
59
                ip addr add "$ipaddr" dev "$BRIDGE"