forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debian: Add a package for host components.
Signed-off-by: Gurucharan Shetty <[email protected]> Acked-by: Ben Pfaff <[email protected]>
- Loading branch information
Showing
11 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,6 @@ | |
/openvswitch-testcontroller | ||
/openvswitch-vtep | ||
/ovn-common | ||
/ovn-host | ||
/python-openvswitch | ||
/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/share/ovn/host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#! /bin/sh | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: ovn-host | ||
# Required-Start: openvswitch-switch $remote_fs $syslog | ||
# Required-Stop: $remote_fs | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: OVN host components | ||
# Description: ovn-host provides the userspace | ||
# components and utilities for OVN that can be run on | ||
# every host/hypervisor. | ||
### END INIT INFO | ||
|
||
test -x /usr/bin/ovn-controller || exit 0 | ||
test -x /usr/share/openvswitch/scripts/ovn-ctl || exit 0 | ||
|
||
_SYSTEMCTL_SKIP_REDIRECT=yes | ||
|
||
. /usr/share/openvswitch/scripts/ovs-lib | ||
if [ -e /etc/default/ovn-host ]; then | ||
. /etc/default/ovn-host | ||
fi | ||
|
||
start () { | ||
set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_controller} | ||
set "$@" $OVN_CTL_OPTS | ||
"$@" || exit $? | ||
} | ||
|
||
case $1 in | ||
start) | ||
start | ||
;; | ||
stop | force-stop) | ||
/usr/share/openvswitch/scripts/ovn-ctl stop_controller | ||
;; | ||
restart) | ||
start restart_controller | ||
;; | ||
status) | ||
/usr/share/openvswitch/scripts/ovn-ctl status_controller | ||
exit $? | ||
;; | ||
reload | force-reload) | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
usr/bin/ovn-controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ovn/controller/ovn-controller.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/sh | ||
# postinst script for ovn-host | ||
# | ||
# see: dh_installdeb(1) | ||
|
||
set -e | ||
|
||
# summary of how this script can be called: | ||
# * <postinst> `configure' <most-recently-configured-version> | ||
# * <old-postinst> `abort-upgrade' <new version> | ||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package> | ||
# <new-version> | ||
# * <postinst> `abort-remove' | ||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' | ||
# <failed-install-package> <version> `removing' | ||
# <conflicting-package> <version> | ||
# for details, see http://www.debian.org/doc/debian-policy/ or | ||
# the debian-policy package | ||
|
||
|
||
case "$1" in | ||
configure) | ||
DEFAULT=/etc/default/ovn-host | ||
TEMPLATE=/usr/share/ovn/host/default.template | ||
if ! test -e $DEFAULT; then | ||
cp $TEMPLATE $DEFAULT | ||
else | ||
for var in $(awk -F'[ :]' '/^# [_A-Z0-9]+:/{print $2}' $TEMPLATE) | ||
do | ||
if ! grep $var $DEFAULT >/dev/null 2>&1; then | ||
echo >> $DEFAULT | ||
sed -n "/$var:/,/$var=/p" $TEMPLATE >> $DEFAULT | ||
fi | ||
done | ||
fi | ||
;; | ||
|
||
abort-upgrade|abort-remove|abort-deconfigure) | ||
;; | ||
|
||
*) | ||
echo "postinst called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
# postrm script for ovn-host | ||
# | ||
# see: dh_installdeb(1) | ||
|
||
set -e | ||
|
||
# summary of how this script can be called: | ||
# * <postrm> `remove' | ||
# * <postrm> `purge' | ||
# * <old-postrm> `upgrade' <new-version> | ||
# * <new-postrm> `failed-upgrade' <old-version> | ||
# * <new-postrm> `abort-install' | ||
# * <new-postrm> `abort-install' <old-version> | ||
# * <new-postrm> `abort-upgrade' <old-version> | ||
# * <disappearer's-postrm> `disappear' <overwriter> | ||
# <overwriter-version> | ||
# for details, see http://www.debian.org/doc/debian-policy/ or | ||
# the debian-policy package | ||
|
||
|
||
case "$1" in | ||
purge) | ||
rm -f /etc/default/ovn-host | ||
rm -f /var/log/openvswitch/ovn-controller.log* || true | ||
;; | ||
|
||
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | ||
;; | ||
|
||
*) | ||
echo "postrm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# dh_installdeb will replace this with shell code automatically | ||
# generated by other debhelper scripts. | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This is a POSIX shell fragment -*- sh -*- | ||
|
||
# OVN_CTL_OPTS: Extra options to pass to ovs-ctl. This is, for example, | ||
# a suitable place to specify --ovn-controller-wrapper=valgrind. | ||
# OVN_CTL_OPTS= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters