4 # Provides: openvswitch-vtep
5 # Required-Start: $network $named $remote_fs $syslog
6 # Required-Stop: $remote_fs
7 # Default-Start: 2 3 4 5
9 # Short-Description: Open vSwitch VTEP emulator
10 # Description: Initializes the Open vSwitch VTEP emulator
13 .
/lib
/lsb
/init-functions
15 # Include defaults if available
16 default
=/etc
/default
/openvswitch-vtep
17 if [ -f $default ] ; then
22 if [ "$ENABLE_OVS_VTEP" = "false" ]; then
26 update-rc.d
-f openvswitch-switch remove
>/dev
/null
2>&1
27 /etc
/init.d
/openvswitch-switch stop
29 mkdir
-p "/var/run/openvswitch"
31 if [ ! -e "/etc/openvswitch/conf.db" ]; then
32 ovsdb-tool create
/etc
/openvswitch
/conf.db
/usr
/share
/openvswitch
/vswitch.ovsschema
35 if [ ! -e "/etc/openvswitch/vtep.db" ]; then
36 ovsdb-tool create
/etc
/openvswitch
/vtep.db
/usr
/share
/openvswitch
/vtep.ovsschema
39 if [ ! -e "/etc/openvswitch/ovsclient-cert.pem" ]; then
40 export RANDFILE
="/root/.rnd"
41 cd /etc
/openvswitch
&& ovs-pki req ovsclient
&& ovs-pki self-sign ovsclient
44 ovsdb-server
--pidfile --detach --log-file --remote \
45 punix
:/var
/run
/openvswitch
/db.sock \
46 --remote=db
:hardware_vtep
,Global
,managers \
47 --private-key=/etc
/openvswitch
/ovsclient-privkey.pem \
48 --certificate=/etc
/openvswitch
/ovsclient-cert.pem \
49 --bootstrap-ca-cert=/etc
/openvswitch
/vswitchd.cacert \
50 /etc
/openvswitch
/conf.db
/etc
/openvswitch
/vtep.db
54 ovs-vswitchd
--pidfile --detach --log-file \
55 unix
:/var
/run
/openvswitch
/db.sock
59 /etc
/init.d
/openvswitch-switch stop
74 echo "Usage: $0 {start|stop|restart|force-reload}" >&2