forked from ab922530/496-cloud-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-network-plugin.sh
More file actions
45 lines (36 loc) · 778 Bytes
/
setup-network-plugin.sh
File metadata and controls
45 lines (36 loc) · 778 Bytes
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
40
41
42
43
44
45
#!/bin/sh
##
## Setup a OpenStack node to run whichever ML2 plugin we're configured to run.
##
set -x
# Gotta know the rules!
if [ $EUID -ne 0 ] ; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Grab our libs
. "`dirname $0`/setup-lib.sh"
if [ -f $OURDIR/setup-network-plugin-done ]; then
exit 0
fi
logtstart "network-plugin"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
if [ -f $LOCALSETTINGS ]; then
. $LOCALSETTINGS
fi
if [ "${ML2PLUGIN}" = "linuxbridge" ]; then
$DIRNAME/setup-network-plugin-linuxbridge.sh
else
$DIRNAME/setup-network-plugin-openvswitch.sh
fi
if [ $? -eq 0 ]; then
touch $OURDIR/setup-network-plugin-done
logtend "network-plugin"
exit 0
else
err=$?
logtend "network-plugin"
exit $err
fi