Revision dc1fe8df tools/kvm-ifup.in
b/tools/kvm-ifup.in | ||
---|---|---|
1 | 1 |
#!/bin/bash |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2011, 2012 Google Inc. |
|
4 |
# Copyright (C) 2011, 2012, 2014 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
20 | 20 |
|
21 | 21 |
source @PKGLIBDIR@/net-common |
22 | 22 |
|
23 |
check |
|
24 |
|
|
25 |
# Execute the script for setting up the communication with the |
|
26 |
# instance OS |
|
27 |
if is_instance_communication_tap && [ -x "$CONF_DIR/kvm-ifup-os" ]; then |
|
28 |
. $CONF_DIR/kvm-ifup-os |
|
29 |
fi |
|
30 |
|
|
23 | 31 |
# Execute the user-supplied network script, if applicable |
24 | 32 |
if [ -x "$CONF_DIR/kvm-vif-bridge" ]; then |
25 | 33 |
exec $CONF_DIR/kvm-vif-bridge |
26 | 34 |
fi |
27 | 35 |
|
28 |
check |
|
29 |
setup_bridge |
|
30 |
setup_ovs |
|
31 |
setup_route |
|
36 |
if ! is_instance_communication_tap; then |
|
37 |
setup_bridge |
|
38 |
setup_ovs |
|
39 |
setup_route |
|
40 |
fi |
Also available in: Unified diff