-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstart-ovs
executable file
·30 lines (28 loc) · 1.47 KB
/
start-ovs
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
#!/bin/bash
## For ovs-vswitchd service, we assume openvswitch, vport_gre,
## vport_vxlan and vport_geneve kernel modules are already
## loaded by the system OS
case $1 in
"ovsdb-server") /usr/share/openvswitch/scripts/ovs-ctl start \
--system-id=random --no-ovs-vswitchd
/usr/share/openvswitch/scripts/ovs-ctl stop
ovsdb-server --pidfile /etc/openvswitch/conf.db \
-vconsole:emer -vsyslog:err -vfile:info \
--remote=punix:/var/run/openvswitch/db.sock \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
--log-file=/var/log/openvswitch/ovsdb-server.log \
--no-chdir
;;
"ovs-vswitchd") /usr/share/openvswitch/scripts/ovs-ctl \
--no-ovsdb-server start
/usr/share/openvswitch/scripts/ovs-ctl \
--no-ovsdb-server force-reload-kmod
/usr/share/openvswitch/scripts/ovs-ctl stop
ovs-vswitchd --pidfile -vconsole:emer -vsyslog:err \
-vfile:info --mlockall --no-chdir \
--log-file=/var/log/openvswitch/ovs-vswitchd.log
;;
*) echo "$0 [ovsdb-server|ovs-vswitchd]"
esac