mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
debian: Bring Debian packaging in-line with new file locations
This commit brings the Debian packaging in-line with the similar changes
that were made to XenServer in commit bc39196
.
This commit is contained in:
2
debian/openvswitch-controller.init
vendored
2
debian/openvswitch-controller.init
vendored
@@ -35,7 +35,7 @@ NAME=ovs-controller # Introduce the short server's name here
|
||||
DESC=ovs-controller # Introduce a short description here
|
||||
LOGDIR=/var/log/openvswitch # Log directory to use
|
||||
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
PIDFILE=/var/run/openvswitch/$NAME.pid
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
|
4
debian/openvswitch-monitor.default
vendored
4
debian/openvswitch-monitor.default
vendored
@@ -18,11 +18,11 @@ THRESHOLD=3
|
||||
INTERVAL=1
|
||||
|
||||
# LOG_FILE: File to log messages related to monitoring.
|
||||
LOG_FILE="/var/log/openvswitch/monitor"
|
||||
LOG_FILE="/var/log/openvswitch/ovs-monitor.log"
|
||||
|
||||
# SWITCH_VCONN: The vconn used to connect to the switch
|
||||
# (ovs-openflowd). The ovs-openflowd must be configured to listen to
|
||||
# this vconn. The default here set is also listened to by default by
|
||||
# the openvswitch-switch package, so ordinarily there is no need to
|
||||
# modify this.
|
||||
SWITCH_VCONN="/var/run/ovs-openflowd.mgmt"
|
||||
SWITCH_VCONN="/var/run/openvswitch/ovs-openflowd.mgmt"
|
||||
|
4
debian/openvswitch-monitor.init
vendored
4
debian/openvswitch-monitor.init
vendored
@@ -36,10 +36,10 @@
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
DAEMON=/usr/sbin/ovs-monitor
|
||||
NAME=openvswitch-monitor
|
||||
NAME=ovs-monitor
|
||||
DESC="Open vSwitch switch monitor"
|
||||
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
PIDFILE=/var/run/openvswitch/$NAME.pid
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
|
2
debian/openvswitch-pki-server.postinst
vendored
2
debian/openvswitch-pki-server.postinst
vendored
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# postinst script for openflow
|
||||
# postinst script for openflow-pki-server
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
|
2
debian/openvswitch-pki.postinst
vendored
2
debian/openvswitch-pki.postinst
vendored
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# postinst script for openvswitch
|
||||
# postinst script for openvswitch-pki
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
|
45
debian/openvswitch-switch.init
vendored
45
debian/openvswitch-switch.init
vendored
@@ -66,11 +66,11 @@ running_pid()
|
||||
# running name
|
||||
#
|
||||
# Checks for a running process named 'name' by looking for a pidfile
|
||||
# named /var/run/${name}.pid
|
||||
# named /var/run/openvswitch/${name}.pid
|
||||
running()
|
||||
{
|
||||
local name=$1
|
||||
local pidfile=/var/run/${name}.pid
|
||||
local pidfile=/var/run/openvswitch/${name}.pid
|
||||
|
||||
# No pidfile, probably no daemon present
|
||||
[ ! -f "$pidfile" ] && return 1
|
||||
@@ -84,11 +84,11 @@ running()
|
||||
# force_stop name
|
||||
#
|
||||
# Checks for a running process named 'name', by looking for a pidfile
|
||||
# named /var/run/${name}.pid, and then kills it and waits for it to
|
||||
# die.
|
||||
# named /var/run/openvswitch/${name}.pid, and then kills it and waits
|
||||
# for it to die.
|
||||
force_stop() {
|
||||
local name=$1
|
||||
local pidfile=/var/run/${name}.pid
|
||||
local pidfile=/var/run/openvswitch/${name}.pid
|
||||
|
||||
[ ! -f "$pidfile" ] && return
|
||||
if running $name; then
|
||||
@@ -206,14 +206,16 @@ case "$1" in
|
||||
|
||||
# Create an empty configuration database if it doesn't exist.
|
||||
if test ! -e /etc/openvswitch/conf.db; then
|
||||
install -d -m 755 -o root -g root /etc/openvswitch
|
||||
|
||||
# Create configuration database.
|
||||
ovsdb-tool -vANY:console:emer \
|
||||
create /etc/openvswitch-switch/conf \
|
||||
create /etc/openvswitch/conf.db \
|
||||
/usr/share/openvswitch/vswitch.ovsschema
|
||||
else
|
||||
# Upgrade or downgrade schema and compact database.
|
||||
ovsdb-tool -vANY:console:emer \
|
||||
convert /etc/openvswitch-switch/conf \
|
||||
convert /etc/openvswitch/conf.db \
|
||||
/usr/share/openvswitch/vswitch.ovsschema
|
||||
fi
|
||||
|
||||
@@ -223,19 +225,29 @@ case "$1" in
|
||||
monitor_opt=
|
||||
fi
|
||||
|
||||
if [ ! -d /var/run/openvswitch ]; then
|
||||
install -d -m 755 -o root -g root /var/run/openvswitch
|
||||
fi
|
||||
|
||||
if [ ! -d /var/log/openvswitch ]; then
|
||||
install -d -m 755 -o root -g root /var/log/openvswitch
|
||||
fi
|
||||
|
||||
# Start ovsdb-server.
|
||||
set --
|
||||
set -- "$@" /etc/openvswitch/conf.db
|
||||
set -- "$@" --verbose=ANY:console:emer --verbose=ANY:syslog:err
|
||||
set -- "$@" --log-file
|
||||
set -- "$@" --log-file=/var/log/openvswitch/ovsdb-server.log
|
||||
set -- "$@" --detach --pidfile $monitor_opt
|
||||
set -- "$@" --remote punix:/var/run/ovsdb-server
|
||||
set -- "$@" /etc/openvswitch-switch/conf
|
||||
set -- "$@" --remote punix:/var/run/openvswitch/db.sock
|
||||
set -- "$@" --remote db:Open_vSwitch,managers
|
||||
set -- "$@" --private-key=db:SSL,private_key
|
||||
set -- "$@" --certificate=db:SSL,certificate
|
||||
set -- "$@" --bootstrap-ca-cert=db:SSL,ca_cert
|
||||
set -- "$@" $OVSDB_SERVER_OPTS
|
||||
echo -n "Starting ovsdb-server: "
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/ovsdb-server.pid \
|
||||
start-stop-daemon --start --quiet \
|
||||
--pidfile /var/run/openvswitch/ovsdb-server.pid \
|
||||
--exec $ovsdb_server -- "$@"
|
||||
if running ovsdb-server; then
|
||||
echo "ovsdb-server."
|
||||
@@ -248,12 +260,13 @@ case "$1" in
|
||||
# Start ovs-vswitchd.
|
||||
set --
|
||||
set -- "$@" --verbose=ANY:console:emer --verbose=ANY:syslog:err
|
||||
set -- "$@" --log-file
|
||||
set -- "$@" --log-file=/var/log/openvswitch/ovs-vswitchd.log
|
||||
set -- "$@" --detach --pidfile $monitor_opt
|
||||
set -- "$@" unix:/var/run/ovsdb-server
|
||||
set -- "$@" unix:/var/run/openvswitch/db.sock
|
||||
set -- "$@" $OVS_VSWITCHD_OPTS
|
||||
echo -n "Starting ovs-vswitchd: "
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/ovs-vswitchd.pid \
|
||||
start-stop-daemon --start --quiet \
|
||||
--pidfile /var/run/openvswitch/ovs-vswitchd.pid \
|
||||
--exec $ovs_vswitchd -- "$@"
|
||||
if running ovs-vswitchd; then
|
||||
echo "ovs-vswitchd."
|
||||
@@ -264,13 +277,13 @@ case "$1" in
|
||||
stop)
|
||||
echo -n "Stopping ovs-vswitchd: "
|
||||
start-stop-daemon --stop --quiet --oknodo \
|
||||
--pidfile /var/run/ovs-vswitchd.pid \
|
||||
--pidfile /var/run/openvswitch/ovs-vswitchd.pid \
|
||||
--exec $ovs_vswitchd
|
||||
echo "ovs-vswitchd."
|
||||
|
||||
echo -n "Stopping ovsdb-server: "
|
||||
start-stop-daemon --stop --quiet --oknodo \
|
||||
--pidfile /var/run/ovsdb-server.pid \
|
||||
--pidfile /var/run/openvswitch/ovsdb-server.pid \
|
||||
--exec $ovsdb_server
|
||||
echo "ovsdb-server."
|
||||
;;
|
||||
|
26
debian/openvswitch-switch.logrotate
vendored
26
debian/openvswitch-switch.logrotate
vendored
@@ -1,11 +1,17 @@
|
||||
/var/log/openvswitch/ovs-openflowd.log {
|
||||
daily
|
||||
compress
|
||||
create 640 root adm
|
||||
delaycompress
|
||||
missingok
|
||||
rotate 30
|
||||
postrotate
|
||||
ovs-appctl --target=ovs-openflowd vlog/reopen
|
||||
endscript
|
||||
/var/log/openvswitch/*.log {
|
||||
daily
|
||||
compress
|
||||
create 640 root adm
|
||||
delaycompress
|
||||
missingok
|
||||
rotate 30
|
||||
postrotate
|
||||
# Tell Open vSwitch daemons to reopen their log files
|
||||
if [ -e /var/run/openvswitch/ovs-vswitchd.pid ]; then
|
||||
ovs-appctl --t ovs-vswitchd vlog/reopen
|
||||
fi
|
||||
if [ -e /var/run/openvswitch/ovsdb-server.pid ]; then
|
||||
ovs-appctl --t ovsdb-server vlog/reopen
|
||||
fi
|
||||
endscript
|
||||
}
|
||||
|
4
debian/openvswitch-switch.postrm
vendored
4
debian/openvswitch-switch.postrm
vendored
@@ -21,8 +21,8 @@ set -e
|
||||
|
||||
case "$1" in
|
||||
purge)
|
||||
rm -f /etc/openvswitch-switch/conf
|
||||
rm -f /etc/openvswitch-switch/.conf.~lock~
|
||||
rm -f /etc/openvswitch/conf.db
|
||||
rm -f /etc/openvswitch/.conf.db.~lock~
|
||||
rm -f /etc/default/openvswitch-switch
|
||||
rm -f /var/log/openvswitch/*
|
||||
;;
|
||||
|
2
debian/openvswitch-switch.template
vendored
2
debian/openvswitch-switch.template
vendored
@@ -9,7 +9,7 @@
|
||||
# e.g. "--fail=open"
|
||||
OVSDB_SERVER_OPTS=
|
||||
|
||||
# OVS_VSWITCHD_OPTS: Additional options to pass to ovs-openflowd,
|
||||
# OVS_VSWITCHD_OPTS: Additional options to pass to ovs-vswitchd,
|
||||
# e.g. "--fail=open"
|
||||
OVS_VSWITCHD_OPTS=
|
||||
|
||||
|
2
debian/openvswitch-switchui.default
vendored
2
debian/openvswitch-switchui.default
vendored
@@ -13,7 +13,7 @@
|
||||
# The ovs-openflowd must be configured to listen to this vconn. The default
|
||||
# here set is also listened to by default by the openvswitch-switch
|
||||
# package, so ordinarily there is no need to modify this.
|
||||
SWITCH_VCONN="unix:/var/run/ovs-openflowd.mgmt"
|
||||
SWITCH_VCONN="unix:/var/run/openvswitch/ovs-openflowd.mgmt"
|
||||
|
||||
# EZIO3_DEVICE: To display the switch monitor on an EZIO3 (aka
|
||||
# MTB-134) 16x2 LCD displays found on server appliances made by
|
||||
|
4
debian/openvswitch-switchui.init
vendored
4
debian/openvswitch-switchui.init
vendored
@@ -37,9 +37,9 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
DAEMON=/usr/bin/ovs-switchui
|
||||
NAME=openvswitch-switchui
|
||||
DESC="Open vSwitch switch monitor"
|
||||
DESC="Open vSwitch UI"
|
||||
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
PIDFILE=/var/run/openvswitch/$NAME.pid
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
|
4
debian/openvswitch-wdt.init
vendored
4
debian/openvswitch-wdt.init
vendored
@@ -37,9 +37,9 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
DAEMON=/usr/sbin/ovs-wdt
|
||||
NAME=openvswitch-wdt
|
||||
DESC="Open vSwitch switch watchdog"
|
||||
DESC="Open vSwitch watchdog"
|
||||
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
PIDFILE=/var/run/openvswitch/$NAME.pid
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
|
4
debian/ovs-switch-setup
vendored
4
debian/ovs-switch-setup
vendored
@@ -15,8 +15,8 @@ my $debconf_owner = 'openvswitch-switch';
|
||||
|
||||
my $default = '/etc/default/openvswitch-switch';
|
||||
my $template = '/usr/share/openvswitch/switch/default.template';
|
||||
my $etc = '/etc/openvswitch-switch';
|
||||
my $rundir = '/var/run';
|
||||
my $etc = '/etc/openvswitch';
|
||||
my $rundir = '/var/run/openvswitch';
|
||||
my $privkey_file = "$etc/of0-privkey.pem";
|
||||
my $req_file = "$etc/of0-req.pem";
|
||||
my $cert_file = "$etc/of0-cert.pem";
|
||||
|
10
debian/ovs-switch-setup.8
vendored
10
debian/ovs-switch-setup.8
vendored
@@ -18,20 +18,20 @@ ovs\-switch\-setup does not accept any command-line options.
|
||||
.IP /etc/default/openvswitch-switch
|
||||
Main configuration file for Open vSwitch switch.
|
||||
|
||||
.IP /etc/openvswitch-switch/cacert.pem
|
||||
.IP /etc/openvswitch/cacert.pem
|
||||
Default location of CA certificate for OpenFlow controllers.
|
||||
|
||||
.IP /etc/openvswitch-switch/of0-cert.pem
|
||||
.IP /etc/openvswitch/of0-cert.pem
|
||||
Default location of certificate for the Open vSwitch switch's private key.
|
||||
|
||||
.IP /etc/openvswitch-switch/of0-privkey.pem
|
||||
.IP /etc/openvswitch/of0-privkey.pem
|
||||
Default location of the Open vSwitch switch's private key. This file
|
||||
should be readable only by \fBroot\fR.
|
||||
|
||||
.IP /etc/openvswitch-switch/of0-req.pem
|
||||
.IP /etc/openvswitch/of0-req.pem
|
||||
Default location of certificate request for the Open vSwitch switch's
|
||||
certificate. This file is not used after the signed certificate
|
||||
(typically \fB/etc/openvswitch-switch/of0-cert.pem\fR, above) has been
|
||||
(typically \fB/etc/openvswitch/of0-cert.pem\fR, above) has been
|
||||
obtained from the OpenFlow PKI server.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
Reference in New Issue
Block a user