X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=trusty%2Fdebian%2Fneutron-openvswitch-agent.upstart.in;fp=trusty%2Fdebian%2Fneutron-openvswitch-agent.upstart.in;h=256e9a5f6097f2e254f3387f98df2dc0c2a216e2;hb=33f494780fed13daabda23be6ceef83210e1d403;hp=0000000000000000000000000000000000000000;hpb=54c2ba6a6661f3214775d91c5755c37c685574a4;p=openstack-build%2Fneutron-build.git diff --git a/trusty/debian/neutron-openvswitch-agent.upstart.in b/trusty/debian/neutron-openvswitch-agent.upstart.in new file mode 100644 index 000000000..256e9a5f6 --- /dev/null +++ b/trusty/debian/neutron-openvswitch-agent.upstart.in @@ -0,0 +1,39 @@ +description "Neutron openvswitch plugin agent" +author "Thomas Goirand " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/neutron + chown neutron:root /var/run/neutron +end script + +script + [ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0 + . /usr/share/neutron-common/plugin_guess_func + + if ! [ -r /etc/neutron/neutron.conf ] ; then + echo "Cloud not read /etc/neutron/neutron.conf: exiting" + exit 0 + fi + CURRENT_PLUGIN=`grep "^[ \t]*core_plugin[ \t]*=[ \t]*[._a-zA-Z0-9]*\$" /etc/neutron/neutron.conf | sed -e 's/^[ \t]*core_plugin[ \t]*=[ \t]*//'` + if [ -z "${CURRENT_PLUGIN}" ] ; then + echo "No core_plugin= value found: please set it and try again" + exit 0 + fi + + neutron_core_plugin_to_plugin_name ${CURRENT_PLUGIN} + neutron_plugin_ini_path ${NEUTRON_PLUGIN_NAME} + [ -r "$NEUTRON_PLUGIN_CONFIG" ] && CONF_ARG="--config-file $NEUTRON_PLUGIN_CONFIG" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/ovs-agent.log" + exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-openvswitch-agent -- \ + --config-file=/etc/neutron/neutron.conf \ + $CONF_ARG $DAEMON_ARGS +end script