Statistics
| Branch: | Tag: | Revision:

root / tools / kvm-ifup.in @ 65b526e7

History | View | Annotate | Download (1.2 kB)

1 1817dca9 Michael Hanselmann
#!/bin/bash
2 f299ca21 Michael Hanselmann
#
3 26916aad Apollon Oikonomopoulos
4 dc1fe8df Jose A. Lopes
# Copyright (C) 2011, 2012, 2014 Google Inc.
5 26916aad Apollon Oikonomopoulos
#
6 26916aad Apollon Oikonomopoulos
# This program is free software; you can redistribute it and/or modify
7 26916aad Apollon Oikonomopoulos
# it under the terms of the GNU General Public License as published by
8 26916aad Apollon Oikonomopoulos
# the Free Software Foundation; either version 2 of the License, or
9 26916aad Apollon Oikonomopoulos
# (at your option) any later version.
10 26916aad Apollon Oikonomopoulos
#
11 26916aad Apollon Oikonomopoulos
# This program is distributed in the hope that it will be useful, but
12 26916aad Apollon Oikonomopoulos
# WITHOUT ANY WARRANTY; without even the implied warranty of
13 26916aad Apollon Oikonomopoulos
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 26916aad Apollon Oikonomopoulos
# General Public License for more details.
15 26916aad Apollon Oikonomopoulos
#
16 26916aad Apollon Oikonomopoulos
# You should have received a copy of the GNU General Public License
17 26916aad Apollon Oikonomopoulos
# along with this program; if not, write to the Free Software
18 26916aad Apollon Oikonomopoulos
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 26916aad Apollon Oikonomopoulos
# 02110-1301, USA.
20 26916aad Apollon Oikonomopoulos
21 4855760b Dimitris Aragiorgis
source @PKGLIBDIR@/net-common
22 26916aad Apollon Oikonomopoulos
23 dc1fe8df Jose A. Lopes
check
24 dc1fe8df Jose A. Lopes
25 dc1fe8df Jose A. Lopes
# Execute the script for setting up the communication with the
26 dc1fe8df Jose A. Lopes
# instance OS
27 dc1fe8df Jose A. Lopes
if is_instance_communication_tap && [ -x "$CONF_DIR/kvm-ifup-os" ]; then
28 dc1fe8df Jose A. Lopes
  . $CONF_DIR/kvm-ifup-os
29 dc1fe8df Jose A. Lopes
fi
30 dc1fe8df Jose A. Lopes
31 26916aad Apollon Oikonomopoulos
# Execute the user-supplied network script, if applicable
32 6e3bf290 Michael Hanselmann
if [ -x "$CONF_DIR/kvm-vif-bridge" ]; then
33 6e3bf290 Michael Hanselmann
  exec $CONF_DIR/kvm-vif-bridge
34 26916aad Apollon Oikonomopoulos
fi
35 26916aad Apollon Oikonomopoulos
36 dc1fe8df Jose A. Lopes
if ! is_instance_communication_tap; then
37 dc1fe8df Jose A. Lopes
  setup_bridge
38 dc1fe8df Jose A. Lopes
  setup_ovs
39 dc1fe8df Jose A. Lopes
  setup_route
40 dc1fe8df Jose A. Lopes
fi