3 # Provides: neutron-server
4 # Required-Start: $remote_fs $syslog
5 # Required-Stop: $remote_fs $syslog
6 # Should-Start: mysql postgresql rabbitmq-server keystone
7 # Should-Stop: mysql postgresql rabbitmq-server keystone
8 # Default-Start: 2 3 4 5
10 # Short-Description: neutron-server
11 # Description: Provides the Neutron networking service
14 DESC="OpenStack Neutron Server"
16 NAME=${PROJECT_NAME}-server
18 ### Maintain the plugin selection so that we can load the corresponding .ini file ###
19 ### after this, openstack-pkg-tools will add --config-file=/etc/neutron/neutron.conf ###
21 [ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
22 . /usr/share/neutron-common/plugin_guess_func
24 if ! [ -r /etc/neutron/neutron.conf ] ; then
25 echo "Cloud not read /etc/neutron/neutron.conf: exiting"
29 CURRENT_PLUGIN=`grep "^[ \t]*core_plugin[ \t]*=[ \t]*[._a-zA-Z0-9]*\$" /etc/neutron/neutron.conf | sed -e 's/^[ \t]*core_plugin[ \t]*=[ \t]*//'`
30 if [ -z "${CURRENT_PLUGIN}" ] ; then
31 echo "No core_plugin= value found: please set it and try again"
34 neutron_core_plugin_to_plugin_name ${CURRENT_PLUGIN}
35 neutron_plugin_ini_path ${NEUTRON_PLUGIN_NAME}
36 if [ -z "${NEUTRON_PLUGIN_CONFIG}" ] ; then
37 echo "Plugin not recognized: please edit /etc/init.d/neutron-server to select the correct .ini file to load for your plugin"
39 DAEMON_ARGS="${DAEMON_ARGS} --config-file=${NEUTRON_PLUGIN_CONFIG}"
40 DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin"
43 ### Neutron folders creation ###
44 mkdir -p /var/lib/neutron/tmp
45 chown neutron:neutron /var/lib/neutron/tmp
46 export TMPDIR=/var/lib/neutron/tmp