/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 recompile
  • Date: 2012-01-02 01:58:41 UTC
  • Revision ID: teddy@recompile.se-20120102015841-2krpl2epdhishtpg
* mandos: Consistent terminology; use the term "secret" for the
          client's stored data.
  (ClientDBus.__init__): Removed dead code.
  (Clienthandler.handle): Bug fix: send NewRequest signal with only IP
                          address, not str() of address tuple.

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"