File openstack-neutron-ovs-cleanup.init of Package openstack-neutron
#! /bin/sh
### BEGIN INIT INFO
# Provides: neutron-ovs-cleanup
# Required-Start: $remote_fs $syslog openvswitch-switch
# Required-Stop: $remote_fs $syslog openvswitch-switch
# Should-Start: mysql postgresql rabbitmq-server
# Should-Stop: mysql postgresql rabbitmq-server
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: neutron-ovs-cleanup
# Description: Clean up integration bridges in OVS before starting Neutron
### END INIT INFO
NEUTRON_LOGFILE="/var/log/neutron/ovs-cleanup.log"
NEUTRON_SYSCONFIG="/etc/sysconfig/neutron"
USER="neutron"
DAEMON=/usr/bin/neutron-ovs-cleanup
DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
DAEMON_DIR=/var/run
test -r $NEUTRON_SYSCONFIG || exit 6
. $NEUTRON_SYSCONFIG
for i in $NEUTRON_PLUGIN_CONF; do
DAEMON_ARGS="$DAEMON_ARGS --config-file $i"
done
DAEMON_ARGS="$DAEMON_ARGS --config-file=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
export TMPDIR=/var/lib/neutron/tmp
if [ ! -x ${DAEMON} ] ; then
exit 0
fi
. /etc/rc.status
case "$1" in
start)
echo -n "Performing Cleanup of OpenVSwitch bridges for Neutron"
su $USER -s /bin/sh -c "$DAEMON $DAEMON_ARGS"
rc_status -v
;;
stop)
;;
restart|force-reload)
;;
reload)
;;
status)
true
rc_status -v
;;
*)
echo $"Usage: $0 {start|stop|restart|force-reload|status}"
exit 2
;;
esac
exit $?