/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: 2011-12-31 14:05:57 UTC
  • mto: This revision was merged to the branch mainline in revision 541.
  • Revision ID: teddy@recompile.se-20111231140557-5u4s7s2122gsw5uq
* network-hooks.s/bridge: Don't use interface names directly; search
                          for interface names using their address.
  (addrtoif): New function.
* network-hooks.s/bridge.conf (PORTS): Removed.
  (PORT_ADDRESSES): New.
* network-hooks.s/wireless: Don't use interface names directly; search
                            for interface names using their address.
  (addrtoif): New function.
* network-hooks.s/wireless.conf: Specify address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
CONFIG="$MANDOSNETHOOKDIR/bridge.conf"
17
17
 
18
18
addrtoif(){
19
 
    grep -liFe "$1" /sys/class/net/*/address | sed -e 's,.*/\([^/]*\)/[^/]*,\1,'
 
19
    grep -liFe "$1" /sys/class/net/*/address \
 
20
        | sed -e 's,.*/\([^/]*\)/[^/]*,\1,'
20
21
}
21
22
 
22
23
# Read config file, which must set "BRIDGE", "PORT_ADDRESSES", and