]>
Commit | Line | Data |
---|---|---|
6b4dc055 AG |
1 | #!/bin/bash |
2 | # | |
3 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | # you may not use this file except in compliance with the License. | |
5 | # You may obtain a copy of the License at: | |
6 | # | |
7 | # http://www.apache.org/licenses/LICENSE-2.0 | |
8 | # | |
9 | # Unless required by applicable law or agreed to in writing, software | |
10 | # distributed under the License is distributed on an "AS IS" BASIS, | |
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | # See the License for the specific language governing permissions and | |
13 | # limitations under the License. | |
14 | ||
15 | case $1 in | |
16 | "ovsdb-server") /usr/share/openvswitch/scripts/ovs-ctl start \ | |
17 | --system-id=random --no-ovs-vswitchd | |
18 | /usr/share/openvswitch/scripts/ovs-ctl stop | |
19 | ovsdb-server --pidfile /etc/openvswitch/conf.db \ | |
20 | -vconsole:emer -vsyslog:err -vfile:info \ | |
21 | --remote=punix:/var/run/openvswitch/db.sock \ | |
22 | --private-key=db:Open_vSwitch,SSL,private_key \ | |
23 | --certificate=db:Open_vSwitch,SSL,certificate \ | |
24 | --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ | |
25 | --log-file=/var/log/openvswitch/ovsdb-server.log \ | |
26 | --no-chdir | |
27 | ;; | |
28 | "ovs-vswitchd") depmod -a | |
29 | modprobe openvswitch | |
30 | modprobe vport_stt | |
31 | modprobe vport_geneve | |
32 | /usr/share/openvswitch/scripts/ovs-ctl \ | |
33 | --no-ovsdb-server start | |
34 | /usr/share/openvswitch/scripts/ovs-ctl \ | |
35 | --no-ovsdb-server force-reload-kmod | |
36 | /usr/share/openvswitch/scripts/ovs-ctl stop | |
37 | ovs-vswitchd --pidfile -vconsole:emer -vsyslog:err \ | |
38 | -vfile:info --mlockall --no-chdir \ | |
39 | --log-file=/var/log/openvswitch/ovs-vswitchd.log | |
40 | ;; | |
2947774c AG |
41 | "ovs-vswitchd-host") /usr/share/openvswitch/scripts/ovs-ctl \ |
42 | --no-ovsdb-server start | |
43 | /usr/share/openvswitch/scripts/ovs-ctl stop | |
44 | ovs-vswitchd --pidfile -vconsole:emer \ | |
45 | -vsyslog:err -vfile:info --mlockall --no-chdir \ | |
46 | --log-file=/var/log/openvswitch/ovs-vswitchd.log | |
47 | ;; | |
48 | *) echo "$0 [ovsdb-server|ovs-vswitchd|ovs-vswitchd-host]" | |
49 | esac |