blob: 5eb5daf3482723ca9962e3b0b120b055d721d72f (
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
|
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovsdb-server,v 1.1 2012/06/27 08:49:34 dev-zero Exp $
depend() {
need localmount
}
start() {
checkpath -d "/var/run/openvswitch" -m 0750
local remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
local remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
local private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
local certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
local bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
ebegin "Starting Open vSwitch DB server"
start-stop-daemon \
--start --quiet \
--pidfile "/var/run/openvswitch/ovsdb-server.pid" \
--exec /usr/sbin/ovsdb-server -- --pidfile --detach --monitor ${remote_punix} ${remote_db} ${private_key} ${certificate} ${bootstrap_ca_cert} ${DATABASE} ${OPTIONS}
eend $?
}
stop() {
ebegin "Stopping Open vSwitch DB server"
start-stop-daemon --stop --quiet --pidfile "/var/run/openvswitch/ovsdb-server.pid"
eend $?
}
|