/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-02-26 11:49:48 UTC
  • mfrom: (560.1.2 deprecate-dbus)
  • Revision ID: teddy@recompile.se-20120226114948-eho4a6wn5ock5h7g
Merge D-Bus interface annotations and D-Bus interface deprecations.

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,'
 
23
        | sed -e 's,.*/\([^/]*\)/[^/]*,\1,' -e "/^${BRIDGE}\$/d"
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
 
for b in /sbin/brctl /usr/sbin/brctl; do
 
40
brctl="/sbin/brctl"
 
41
for b in "$brctl" /usr/sbin/brctl; do
41
42
    if [ -e "$b" ]; then
42
43
        brctl="$b"
43
44
        break
53
54
            ip link set dev "$interface" up
54
55
        done
55
56
        ip link set dev "$BRIDGE" up
56
 
        sleep "$DELAY"
 
57
        sleep "${DELAY%%.*}"
57
58
        if [ -n "$IPADDRS" ]; then
58
59
            for ipaddr in $IPADDRS; do
59
60
                ip addr add "$ipaddr" dev "$BRIDGE"