blob: 1df6ad6ac16b184b847573ebcc56b963287d0ad3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/bash
## vim: set syn=on ts=4 sw=4 sts=0 noet foldmethod=indent:
## copyright: B1 Systems GmbH <info@b1-systems.de>, 2012.
## author: Christian Berendt <berendt@b1-systems.de>, 2012.
## license: Apache License, Version 2.0
##
## purpose:
## Creates a new vif device without attaching it to a
## bridge. Quantum Linux Bridge Agent will attach the
## created device to the belonging bridge.
##
## usage:
## place the script in ${XEN_SCRIPT_DIR}/vif-openstack and
## set (vif-script vif-openstack) in /etc/xen/xend-config.sxp.
dir=$(dirname "$0")
. "$dir/vif-common.sh"
case "$command" in
online)
setup_virtual_bridge_port "$dev"
ip link set $dev up
;;
offline)
ip link set $dev down
;;
add)
setup_virtual_bridge_port "$dev"
ip link set $dev up
;;
esac
if [ "$type_if" = vif -a "$command" = "online" ]
then
success
fi
|