~ubuntu-branches/ubuntu/wily/bridge-utils/wily

« back to all changes in this revision

Viewing changes to debian/bridge-network-interface.sh

  • Committer: Package Import Robot
  • Author(s): Santiago Garcia Mantinan
  • Date: 2012-06-29 10:56:51 UTC
  • mfrom: (5.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20120629105651-zcet0cb54y8ddn1o
Tags: 1.5-4
* Remove mkdir and exit if /run/network doesn't exist. Thanks
  to Andrew Shadura. Closes: #676183.
* Allow hotplug of ports to be user configurable and default
  to disable. Closes: #673490.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
        exit 1
14
14
fi
15
15
 
 
16
#default configuration
 
17
BRIDGE_HOTPLUG=no
 
18
[ -f /etc/default/bridge-utils ] && . /etc/default/bridge-utils
 
19
 
 
20
[ "$BRIDGE_HOTPLUG" = "no" ] && exit 0
 
21
 
16
22
. /lib/bridge-utils/bridge-utils.sh
17
23
 
18
 
mkdir -p /var/run/network
19
 
for i in $(ifquery --list --allow auto); do
 
24
if [ -d /run/network ]; then
 
25
   for i in $(ifquery --list --allow auto); do
20
26
        ports=$(ifquery $i | sed -n -e's/^bridge[_-]ports: //p')
21
27
        for port in $(bridge_parse_ports $ports); do
22
28
                case $port in
34
40
                                ;;
35
41
                esac
36
42
        done
37
 
done
 
43
   done
 
44
fi