]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
* Now using templated init script for sysv-rc, generated systemd unit and
authorThomas Goirand <thomas@goirand.fr>
Fri, 3 Oct 2014 10:52:49 +0000 (18:52 +0800)
committerThomas Goirand <thomas@goirand.fr>
Fri, 3 Oct 2014 11:00:40 +0000 (19:00 +0800)
    upstart jobs, using openstack-pkg-tools >= 13.

48 files changed:
debian/changelog
debian/control
debian/neutron-dhcp-agent.init [deleted file]
debian/neutron-dhcp-agent.init.in [new file with mode: 0644]
debian/neutron-dhcp-agent.logrotate
debian/neutron-dhcp-agent.service [deleted file]
debian/neutron-dhcp-agent.upstart.in [deleted file]
debian/neutron-l3-agent.init [deleted file]
debian/neutron-l3-agent.init.in [new file with mode: 0644]
debian/neutron-l3-agent.logrotate
debian/neutron-l3-agent.service [deleted file]
debian/neutron-l3-agent.upstart.in [deleted file]
debian/neutron-lbaas-agent.init [deleted file]
debian/neutron-lbaas-agent.init.in [new file with mode: 0644]
debian/neutron-lbaas-agent.logrotate
debian/neutron-lbaas-agent.service [deleted file]
debian/neutron-lbaas-agent.upstart.in [deleted file]
debian/neutron-metadata-agent.init [deleted file]
debian/neutron-metadata-agent.init.in [new file with mode: 0644]
debian/neutron-metadata-agent.logrotate
debian/neutron-metadata-agent.service [deleted file]
debian/neutron-metadata-agent.upstart.in [deleted file]
debian/neutron-metering-agent.init [deleted file]
debian/neutron-metering-agent.init.in [new file with mode: 0644]
debian/neutron-metering-agent.logrotate
debian/neutron-metering-agent.service [deleted file]
debian/neutron-metering-agent.upstart.in [deleted file]
debian/neutron-plugin-linuxbridge-agent.init [deleted file]
debian/neutron-plugin-linuxbridge-agent.init.in [new file with mode: 0644]
debian/neutron-plugin-linuxbridge-agent.logrotate
debian/neutron-plugin-linuxbridge-agent.service [deleted file]
debian/neutron-plugin-linuxbridge-agent.upstart.in [deleted file]
debian/neutron-plugin-nec-agent.logrotate
debian/neutron-plugin-nec-agent.upstart.in [deleted file]
debian/neutron-plugin-openvswitch-agent.init [deleted file]
debian/neutron-plugin-openvswitch-agent.init.in [new file with mode: 0644]
debian/neutron-plugin-openvswitch-agent.logrotate
debian/neutron-plugin-openvswitch-agent.service [deleted file]
debian/neutron-plugin-ryu-agent.upstart.in [deleted file]
debian/neutron-server.init [deleted file]
debian/neutron-server.init.in [new file with mode: 0644]
debian/neutron-server.service [deleted file]
debian/neutron-vpn-agent.init [deleted file]
debian/neutron-vpn-agent.init.in [new file with mode: 0644]
debian/neutron-vpn-agent.logrotate
debian/neutron-vpn-agent.service [deleted file]
debian/neutron-vpn-agent.upstart.in [deleted file]
debian/rules

index ad64659b5ec98cd3884ed57b61a547f0e4d0c3ab..92ffff38dcc1a1e0d80a927d8bd655211881805b 100644 (file)
@@ -1,6 +1,8 @@
 neutron (2014.2~rc1-1) experimental; urgency=medium
 
   * New upstream release.
+  * Now using templated init script for sysv-rc, generated systemd unit and
+    upstart jobs, using openstack-pkg-tools >= 13.
 
  -- Thomas Goirand <zigo@debian.org>  Fri, 03 Oct 2014 18:53:11 +0800
 
index c89c8610d35f87238048179333e632e2b55ec347..b81e5aa9b08babd9d0a9d380206a929517d0d197 100644 (file)
@@ -2,10 +2,9 @@ Source: neutron
 Section: net
 Priority: optional
 Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
-Uploaders: Julien Danjou <acid@debian.org>,
-           Thomas Goirand <zigo@debian.org>,
-           Mehdi Abaakouk <sileht@sileht.net>
+Uploaders: Thomas Goirand <zigo@debian.org>
 Build-Depends: debhelper (>= 9),
+               dh-systemd,
                openstack-pkg-tools (>= 12~),
                po-debconf,
                python-all (>= 2.6),
diff --git a/debian/neutron-dhcp-agent.init b/debian/neutron-dhcp-agent.init
deleted file mode 100644 (file)
index af48fe4..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-dhcp-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      mysql postgresql rabbitmq-server keystone
-# Should-Stop:       mysql postgresql rabbitmq-server keystone
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron DHCP agent
-# Description:       Provide DHCP agent for neutron
-### END INIT INFO
-
-# Author: Mehdi Abaakouk <sileht@sileht.net>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron DHCP agent"
-NAME=neutron-dhcp-agent
-DAEMON=/usr/bin/neutron-dhcp-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/dhcp-agent.log"
-
-mkdir -p /var/run/neutron 
-chown neutron:neutron /var/run/neutron 
-
-do_start()
-{
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-        log_daemon_msg "Starting $DESC" "$NAME"
-        do_start
-        case "$?" in
-            0|1) log_end_msg 0 ;;
-            2) log_end_msg 1 ;;
-        esac
-        ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-      do_start
-       ;;
-  systemd-stop)
-      do_stop
-       ;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        do_stop
-        case "$?" in
-            0|1)
-                do_start
-                case "$?" in
-                    0) log_end_msg 0 ;;
-                    1) log_end_msg 1 ;; # Old process is still running
-                    *) log_end_msg 1 ;; # Failed to start
-                esac
-                ;;
-            *)
-            # Failed to stop
-                log_end_msg 1
-                ;;
-        esac
-        ;;
-
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
diff --git a/debian/neutron-dhcp-agent.init.in b/debian/neutron-dhcp-agent.init.in
new file mode 100644 (file)
index 0000000..2cb4131
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-dhcp-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql rabbitmq-server keystone
+# Should-Stop:       mysql postgresql rabbitmq-server keystone
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron DHCP agent
+# Description:       Provide DHCP agent for neutron
+### END INIT INFO
+
+# Author: Mehdi Abaakouk <sileht@sileht.net>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron DHCP agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-dhcp-agent
+# --config-file=/etc/neutron/neutron.conf will be happened 
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/dhcp_agent.ini"
index b0b9384dc88e7962b4ea1a391deef2e2f1338e47..da6aff1b46f8efc7c453da97331670370bdd4472 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/dhcp-agent.log {
+/var/log/neutron/neutron-dhcp-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-dhcp-agent.service b/debian/neutron-dhcp-agent.service
deleted file mode 100644 (file)
index ad73bf7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - DHCP Service 
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-dhcp-agent systemd-start
-ExecStop=/etc/init.d/neutron-dhcp-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-dhcp-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-dhcp-agent.upstart.in b/debian/neutron-dhcp-agent.upstart.in
deleted file mode 100644 (file)
index 3170cdf..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron l3 agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-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 /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/dhcp-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-dhcp-agent -- \
-                              --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini \
-                              $DAEMON_ARGS
-end script
diff --git a/debian/neutron-l3-agent.init b/debian/neutron-l3-agent.init
deleted file mode 100644 (file)
index 0db175f..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-l3-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron L3 agent
-# Description:       Provide L3 agent for neutron
-### END INIT INFO
-
-# Authors: Mehdi Abaakouk <sileht@sileht.net>
-#          Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron L3 agent"
-NAME=neutron-l3-agent
-DAEMON=/usr/bin/neutron-l3-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/l3-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-        log_daemon_msg "Starting $DESC" "$NAME"
-        do_start
-        case "$?" in
-            0|1) log_end_msg 0 ;;
-            2) log_end_msg 1 ;;
-        esac
-        ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-      do_start
-       ;;
-  systemd-stop)
-      do_stop
-       ;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        do_stop
-        case "$?" in
-            0|1)
-                do_start
-                case "$?" in
-                    0) log_end_msg 0 ;;
-                    1) log_end_msg 1 ;; # Old process is still running
-                    *) log_end_msg 1 ;; # Failed to start
-                esac
-                ;;
-            *)
-            # Failed to stop
-                log_end_msg 1
-                ;;
-        esac
-        ;;
-
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
diff --git a/debian/neutron-l3-agent.init.in b/debian/neutron-l3-agent.init.in
new file mode 100644 (file)
index 0000000..ccc8ea1
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-l3-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron L3 agent
+# Description:       Provide L3 agent for neutron
+### END INIT INFO
+
+# Authors: Mehdi Abaakouk <sileht@sileht.net>
+#          Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron L3 agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-l3-agent
+# --config-file=/etc/neutron/neutron.conf will be happened 
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/l3_agent.ini"
index 8db10721471206639c7168487bbe186a8677e85b..e81917fb57bce9d4a337ac1acb8249e1bfe62549 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/l3-agent.log {
+/var/log/neutron/neutron-l3-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-l3-agent.service b/debian/neutron-l3-agent.service
deleted file mode 100644 (file)
index 0f41918..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - L3 Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-l3-agent systemd-start
-ExecStop=/etc/init.d/neutron-l3-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-l3-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-l3-agent.upstart.in b/debian/neutron-l3-agent.upstart.in
deleted file mode 100644 (file)
index 019c5ae..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron l3 plugin agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-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 /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/l3-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-l3-agent -- \
-                              --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini \
-                              $DAEMON_ARGS
-end script
diff --git a/debian/neutron-lbaas-agent.init b/debian/neutron-lbaas-agent.init
deleted file mode 100644 (file)
index cbdae99..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-lbaas-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      mysql postgresql rabbitmq-server keystone
-# Should-Stop:       mysql postgresql rabbitmq-server keystone
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron LBaaS agent
-# Description:       Provide LBaaS agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron LBaaS agent"
-NAME=neutron-lbaas-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/lbaas-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-        log_daemon_msg "Starting $DESC" "$NAME"
-        do_start
-        case "$?" in
-            0|1) log_end_msg 0 ;;
-            2) log_end_msg 1 ;;
-        esac
-        ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-       do_start
-       ;;
-  systemd-stop)
-       do_stop
-       ;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        do_stop
-        case "$?" in
-            0|1)
-                do_start
-                case "$?" in
-                    0) log_end_msg 0 ;;
-                    1) log_end_msg 1 ;; # Old process is still running
-                    *) log_end_msg 1 ;; # Failed to start
-                esac
-                ;;
-            *)
-            # Failed to stop
-                log_end_msg 1
-                ;;
-        esac
-        ;;
-
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
diff --git a/debian/neutron-lbaas-agent.init.in b/debian/neutron-lbaas-agent.init.in
new file mode 100644 (file)
index 0000000..cad5a1d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-lbaas-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql rabbitmq-server keystone
+# Should-Stop:       mysql postgresql rabbitmq-server keystone
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron LBaaS agent
+# Description:       Provide LBaaS agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron LBaaS agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-lbaas-agent
+# --config-file=/etc/neutron/neutron.conf will be happened 
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/lbaas_agent.ini"
index 078c729e884c40f8d3bd6002a8d5a802b4588f77..9b2d71775e6c039ba48dbedff452e9b875986f6a 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/lbaas-agent.log {
+/var/log/neutron/neutron-lbaas-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-lbaas-agent.service b/debian/neutron-lbaas-agent.service
deleted file mode 100644 (file)
index b25da41..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - LBAAS Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-lbaas-agent systemd-start
-ExecStop=/etc/init.d/neutron-lbaas-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-lbaas-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-lbaas-agent.upstart.in b/debian/neutron-lbaas-agent.upstart.in
deleted file mode 100644 (file)
index 35f1893..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron LBaaS agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
-        mkdir -p /var/run/neutron
-        chown neutron:root /var/run/neutron
-end script
-
-script
-       [ -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/lbaas-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-lbaas-agent -- \
-                              --config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf \
-                              $DAEMON_ARGS
-end script
diff --git a/debian/neutron-metadata-agent.init b/debian/neutron-metadata-agent.init
deleted file mode 100644 (file)
index bfcbdee..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-metadata-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron Metadata Agent agent
-# Description:       Provide Metadata agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron Metadata Agent"
-NAME=neutron-metadata-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metadata-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-        log_daemon_msg "Starting $DESC" "$NAME"
-        do_start
-        case "$?" in
-            0|1) log_end_msg 0 ;;
-            2) log_end_msg 1 ;;
-        esac
-        ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-       do_start
-       ;;
-  systemd-stop)
-       do_stop
-       ;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        do_stop
-        case "$?" in
-            0|1)
-                do_start
-                case "$?" in
-                    0) log_end_msg 0 ;;
-                    1) log_end_msg 1 ;; # Old process is still running
-                    *) log_end_msg 1 ;; # Failed to start
-                esac
-                ;;
-            *)
-            # Failed to stop
-                log_end_msg 1
-                ;;
-        esac
-        ;;
-
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        do_stop
-        case "$?" in
-            0|1)
-                do_start
-                case "$?" in
-                    0) log_end_msg 0 ;;
-                    1) log_end_msg 1 ;; # Old process is still running
-                    *) log_end_msg 1 ;; # Failed to start
-                esac
-                ;;
-            *)
-            # Failed to stop
-                log_end_msg 1
-                ;;
-        esac
-        ;;
-
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
diff --git a/debian/neutron-metadata-agent.init.in b/debian/neutron-metadata-agent.init.in
new file mode 100644 (file)
index 0000000..34552a5
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-metadata-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron Metadata Agent agent
+# Description:       Provide Metadata agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron Metadata Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-metadata-agent
+# --config-file=/etc/neutron/neutron.conf will be happened 
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/metadata_agent.ini"
index bad11bb0d3d81881e0874ae305dbed358f760740..9bfea2f03a6aad6b9f5adfed8afba20332588491 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/metadata-agent.log {
+/var/log/neutron/neutron-metadata-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-metadata-agent.service b/debian/neutron-metadata-agent.service
deleted file mode 100644 (file)
index 5ebab49..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - Metadata Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service neutron-l3-agent.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-metadata-agent systemd-start
-ExecStop=/etc/init.d/neutron-metadata-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-metadata-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-metadata-agent.upstart.in b/debian/neutron-metadata-agent.upstart.in
deleted file mode 100644 (file)
index 1af2195..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron metadata plugin agent"
-author "Yolanda Robla <yolanda.robla@canonical.com>"
-
-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 /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/metadata-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metadata-agent -- \
-                           --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini \
-                           $DAEMON_ARGS
-end script
diff --git a/debian/neutron-metering-agent.init b/debian/neutron-metering-agent.init
deleted file mode 100644 (file)
index dbad517..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-metering-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron Metering Agent agent
-# Description:       Provides Metering agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron Metering Agent"
-NAME=neutron-metering-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metering-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-        log_daemon_msg "Starting $DESC" "$NAME"
-        do_start
-        case "$?" in
-            0|1) log_end_msg 0 ;;
-            2) log_end_msg 1 ;;
-        esac
-        ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-      do_start
-       ;;
-  systemd-stop)
-      do_stop
-      ;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        do_stop
-        case "$?" in
-            0|1)
-                do_start
-                case "$?" in
-                    0) log_end_msg 0 ;;
-                    1) log_end_msg 1 ;; # Old process is still running
-                    *) log_end_msg 1 ;; # Failed to start
-                esac
-                ;;
-            *)
-            # Failed to stop
-                log_end_msg 1
-                ;;
-        esac
-        ;;
-
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
diff --git a/debian/neutron-metering-agent.init.in b/debian/neutron-metering-agent.init.in
new file mode 100644 (file)
index 0000000..2e3a3c6
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-metering-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron Metering Agent agent
+# Description:       Provides Metering agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron Metering Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-metering-agent
+# --config-file=/etc/neutron/neutron.conf will be happened 
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/metering_agent.ini"
index e3923c068883e069a7fd6b07d10776fff8fd2f90..e3f2a5b282c5cd3ece419454f2c09d5b48f1a597 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/metering-agent.log {
+/var/log/neutron/neutron-metering-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-metering-agent.service b/debian/neutron-metering-agent.service
deleted file mode 100644 (file)
index 0bc14a5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - Metering Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-metering-agent systemd-start
-ExecStop=/etc/init.d/neutron-metering-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-metering-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-metering-agent.upstart.in b/debian/neutron-metering-agent.upstart.in
deleted file mode 100644 (file)
index 888a2cf..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron Metering plugin agent"
-author "Thomas Goirand <zigo@debian.org>"
-
-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 /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/metering-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metering-agent -- \
-                           --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini \
-                           $DAEMON_ARGS
-end script
diff --git a/debian/neutron-plugin-linuxbridge-agent.init b/debian/neutron-plugin-linuxbridge-agent.init
deleted file mode 100644 (file)
index 24f8f5a..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-plugin-linuxbridge-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      mysql postgresql rabbitmq-server keystone
-# Should-Stop:       mysql postgresql rabbitmq-server keystone
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron LinuxBridge Agent
-# Description:       Agent to use within neutron linuxbridge client
-### END INIT INFO
-
-# Author: Ghe Rivero <ghe.rivero@stackops.com>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="Openstack Neutron LinuxBridge Plugin Agent"
-NAME=neutron-linuxbridge-agent
-DAEMON=/usr/bin/neutron-linuxbridge-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini --log-file=/var/log/neutron/linuxbridge-agent.log"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CONF_FILE="/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini"
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-. /lib/lsb/init-functions
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
-       start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-    log_daemon_msg "Starting $DESC" "$NAME"
-    do_start
-    case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-  ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-      do_start
-       ;;
-  systemd-stop)
-      do_stop
-      ;;
-  restart|force-reload)
-       log_daemon_msg "Restarting $DESC" "$NAME"
-       do_stop
-       case "$?" in
-         0|1)
-               do_start
-               case "$?" in
-                       0) log_end_msg 0 ;;
-                       1) log_end_msg 1 ;; # Old process is still running
-                       *) log_end_msg 1 ;; # Failed to start
-               esac
-               ;;
-         *)
-               # Failed to stop
-               log_end_msg 1
-               ;;
-       esac
-       ;;
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
-
-:
diff --git a/debian/neutron-plugin-linuxbridge-agent.init.in b/debian/neutron-plugin-linuxbridge-agent.init.in
new file mode 100644 (file)
index 0000000..9e9d390
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-plugin-linuxbridge-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql rabbitmq-server keystone
+# Should-Stop:       mysql postgresql rabbitmq-server keystone
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron LinuxBridge Agent
+# Description:       Agent to use within neutron linuxbridge client
+### END INIT INFO
+
+# Author: Ghe Rivero <ghe.rivero@stackops.com>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Openstack Neutron LinuxBridge Plugin Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-linuxbridge-agent
+# --config-file=/etc/neutron/neutron.conf will be happened 
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini"
index 0a5b085e105cad26abc614def8ff693c25d0d2c0..b3ad82bfe0c6fb3c8c12d1140ed76110297d6bea 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/linuxbridge-agent.log {
+/var/log/neutron/neutron-linuxbridge-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-plugin-linuxbridge-agent.service b/debian/neutron-plugin-linuxbridge-agent.service
deleted file mode 100644 (file)
index f4d9351..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - LinuxBridge Plugin Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-linuxbridge-agent systemd-start
-ExecStop=/etc/init.d/neutron-linuxbridge-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-linuxbridge-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-plugin-linuxbridge-agent.upstart.in b/debian/neutron-plugin-linuxbridge-agent.upstart.in
deleted file mode 100644 (file)
index b720f9c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron server"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-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 /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/linuxbridge-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-linuxbridge-agent -- \
-                              --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini \
-                              $DAEMON_ARGS
-end script
index f204c8248fbb77866b96867192d9fcc7a7f6f6f7..39fa2a24f7276f5910211f949649cd0aa441e154 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/nec-agent.log {
+/var/log/neutron/neutron-nec-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-plugin-nec-agent.upstart.in b/debian/neutron-plugin-nec-agent.upstart.in
deleted file mode 100644 (file)
index bd13690..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron plugin NEC agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
-       mkdir -p /var/run/neutron
-       chown neutron:root /var/run/neutron
-end script
-
-script
-       [ -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/nec-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-nec-agent -- \
-                              --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/nec/nec.ini \
-                              $DAEMON_ARGS
-end script
diff --git a/debian/neutron-plugin-openvswitch-agent.init b/debian/neutron-plugin-openvswitch-agent.init
deleted file mode 100644 (file)
index 76397db..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-plugin-openvswitch-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog openvswitch-switch
-# Required-Stop:     $remote_fs openvswitch-switch
-# Should-Start:      mysql postgresql rabbitmq-server keystone
-# Should-Stop:       mysql postgresql rabbitmq-server keystone
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron OpenVSwitch Agent
-# Description:       Agent to use within neutron openswitch client
-### END INIT INFO
-
-# Authors: Julien Danjou <acid@debian.org>, Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="Openstack Neutron OpenVSwitch Plugin Agent"
-NAME=neutron-openvswitch-agent
-DAEMON=/usr/bin/neutron-openvswitch-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CONF_FILE=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "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"
-
-. /lib/lsb/init-functions
-
-[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
-. /usr/share/neutron-common/plugin_guess_func
-
-### Maintain the plugin selection so that we can load the corresponding .ini file ###
-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}
-if [ ${NEUTRON_PLUGIN_NAME} = ml2 ]; then
-            DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONF_FILE}"
-fi
-if [ -z "${NEUTRON_PLUGIN_CONFIG}" ] ; then
-       echo "Plugin not recognized: please edit /etc/init.d/neutron-server to select the correct .ini file to load for your plugin"
-else
-       DAEMON_ARGS="${DAEMON_ARGS} --config-file=${NEUTRON_PLUGIN_CONFIG}"
-       DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin"
-fi
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
-       if [ -x /usr/bin/neutron-ovs-cleanup ] ; then
-               if [ ! -e /var/run/neutron-ovs-cleanup-performed ] ; then
-                       /usr/bin/neutron-ovs-cleanup
-                       touch /var/run/neutron-ovs-cleanup-performed
-               fi
-       fi
-       start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-    log_daemon_msg "Starting $DESC" "$NAME"
-    do_start
-    case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-  ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-      do_start
-       ;;
-  systemd-stop)
-      do_stop
-      ;;
-  restart|force-reload)
-       log_daemon_msg "Restarting $DESC" "$NAME"
-       do_stop
-       case "$?" in
-         0|1)
-               do_start
-               case "$?" in
-                       0) log_end_msg 0 ;;
-                       1) log_end_msg 1 ;; # Old process is still running
-                       *) log_end_msg 1 ;; # Failed to start
-               esac
-               ;;
-         *)
-               # Failed to stop
-               log_end_msg 1
-               ;;
-       esac
-       ;;
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
-
-:
diff --git a/debian/neutron-plugin-openvswitch-agent.init.in b/debian/neutron-plugin-openvswitch-agent.init.in
new file mode 100644 (file)
index 0000000..5897885
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-plugin-openvswitch-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog openvswitch-switch
+# Required-Stop:     $remote_fs openvswitch-switch
+# Should-Start:      mysql postgresql rabbitmq-server keystone
+# Should-Stop:       mysql postgresql rabbitmq-server keystone
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron OpenVSwitch Agent
+# Description:       Agent to use within neutron openswitch client
+### END INIT INFO
+
+# Authors: Julien Danjou <acid@debian.org>, Thomas Goirand <zigo@debian.org>
+
+DESC="Openstack Neutron OpenVSwitch Plugin Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-openvswitch-agent
+CONF_FILE=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
+
+### Maintain the plugin selection so that we can load the corresponding .ini file    ###
+### after this, openstack-pkg-tools will add --config-file=/etc/neutron/neutron.conf ###
+DAEMON_ARGS=""
+[ -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}
+if [ ${NEUTRON_PLUGIN_NAME} = ml2 ]; then
+            DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONF_FILE}"
+fi
+if [ -z "${NEUTRON_PLUGIN_CONFIG}" ] ; then
+       echo "Plugin not recognized: please edit /etc/init.d/neutron-server to select the correct .ini file to load for your plugin"
+else
+       DAEMON_ARGS="${DAEMON_ARGS} --config-file=${NEUTRON_PLUGIN_CONFIG}"
+       DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin"
+fi
index 60e2b40b88dce486df04821b70da27a54dd50aaa..7dfc813b3524ba5bb86d52a58bb7d5c709b0a479 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/ovs-agent.log {
+/var/log/neutron/neutron-openvswitch-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-plugin-openvswitch-agent.service b/debian/neutron-plugin-openvswitch-agent.service
deleted file mode 100644 (file)
index 3e579ff..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - OpenVSwithc Plugin Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-openvswitch-agent systemd-start
-ExecStop=/etc/init.d/neutron-openvswitch-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-openvswitch-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-plugin-ryu-agent.upstart.in b/debian/neutron-plugin-ryu-agent.upstart.in
deleted file mode 100644 (file)
index f7e0b27..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron plugin ryu agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-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 /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/ryu-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-ryu-agent -- \
-                              --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ryu/ryu.ini \
-                              $DAEMON_ARGS
-end script
diff --git a/debian/neutron-server.init b/debian/neutron-server.init
deleted file mode 100644 (file)
index a5af3c5..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-server
-# Required-Start:    $remote_fs $syslog
-# Required-Stop:     $remote_fs $syslog
-# Should-Start:      mysql postgresql rabbitmq-server keystone
-# Should-Stop:       mysql postgresql rabbitmq-server keystone
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: neutron-server
-# Description:       Provides the Neutron networking service
-### END INIT INFO
-
-export PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron Server"
-NAME=neutron-server
-DAEMON=/usr/bin/${NAME}
-PIDFILE=/var/run/neutron/${NAME}.pid
-SCRIPTNAME=/etc/init.d/${NAME}
-LOGFILE=/var/log/neutron/neutron-server.log
-DAEMON_DIR=/var/run
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
-
-[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
-. /usr/share/neutron-common/plugin_guess_func
-
-### Maintain the plugin selection so that we can load the corresponding .ini file ###
-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}
-if [ -z "${NEUTRON_PLUGIN_CONFIG}" ] ; then
-       echo "Plugin not recognized: please edit /etc/init.d/neutron-server to select the correct .ini file to load for your plugin"
-else
-       DAEMON_ARGS="${DAEMON_ARGS} --config-file=${NEUTRON_PLUGIN_CONFIG}"
-       DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin"
-fi
-
-### Neutron folders creation ###
-make_neutron_folder () {
-       if [ ! -e ${1} ] ; then
-               mkdir -p ${1}
-               if [ ! -d ${1} ] ; then
-                       echo "${1} folder cannot be created: exiting!"
-                       exit 1
-               fi
-               chown neutron:neutron ${1}
-       fi
-}
-for i in /var/run/neutron /var/log/neutron /var/lib/neutron/tmp ; do
-       make_neutron_folder ${i}
-done
-export TMPDIR=/var/lib/neutron/tmp
-
-### Standard init script start/stop/etc. stuff ###
-do_start () {
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --chdir $DAEMON_DIR --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --chdir $DAEMON_DIR --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop () {
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-start)
-       log_daemon_msg "Starting $DESC" "$NAME"
-       do_start
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-;;
-stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               *) log_end_msg 1 ;;
-       esac
-;;
-restart|force-reload)
-       log_daemon_msg "Restarting $DESC" "$NAME"
-       do_stop
-       case "$?" in
-       0|1)
-               do_start
-               case "$?" in
-               0) log_end_msg 0 ;;
-               1) log_end_msg 1 ;; # Old process is still running
-               *) log_end_msg 1 ;; # Failed to start
-               esac
-       ;;
-       *)
-               # Failed to stop
-               log_end_msg 1
-               ;;
-       esac
-;;
-status)
-       status_of_proc -p $PIDFILE $DAEMON neutron-server && exit 0 || exit $?
-;;
-systemd-start)
-    do_start
-;;
-systemd-stop)
-    do_stop
-;;
-*)
-       log_action_msg "Usage: /etc/init.d/neutron-server {start|stop|restart|force-reload|status}"
-       exit 1
-;;
-esac
-
-exit 0
diff --git a/debian/neutron-server.init.in b/debian/neutron-server.init.in
new file mode 100644 (file)
index 0000000..ce6b27b
--- /dev/null
@@ -0,0 +1,46 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-server
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Should-Start:      mysql postgresql rabbitmq-server keystone
+# Should-Stop:       mysql postgresql rabbitmq-server keystone
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: neutron-server
+# Description:       Provides the Neutron networking service
+### END INIT INFO
+
+DESC="OpenStack Neutron Server"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-server
+
+### Maintain the plugin selection so that we can load the corresponding .ini file    ###
+### after this, openstack-pkg-tools will add --config-file=/etc/neutron/neutron.conf ###
+DAEMON_ARGS=""
+[ -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}
+if [ -z "${NEUTRON_PLUGIN_CONFIG}" ] ; then
+       echo "Plugin not recognized: please edit /etc/init.d/neutron-server to select the correct .ini file to load for your plugin"
+else
+       DAEMON_ARGS="${DAEMON_ARGS} --config-file=${NEUTRON_PLUGIN_CONFIG}"
+       DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin"
+fi
+
+### Neutron folders creation ###
+mkdir -p /var/lib/neutron/tmp
+chown neutron:neutron /var/lib/neutron/tmp
+export TMPDIR=/var/lib/neutron/tmp
diff --git a/debian/neutron-server.service b/debian/neutron-server.service
deleted file mode 100644 (file)
index 7cfadbc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - API server
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-server systemd-start
-ExecStop=/etc/init.d/neutron-server systemd-stop
-PIDFile=/var/run/neutron/neutron-server.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-vpn-agent.init b/debian/neutron-vpn-agent.init
deleted file mode 100644 (file)
index 04dec0b..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          neutron-vpn-agent
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Neutron VPN Agent agent
-# Description:       Provides VPN agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron VPN Agent"
-NAME=neutron-vpn-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/vpn-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
-}
-
-do_stop()
-{
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
-       RETVAL="$?"
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-        log_daemon_msg "Starting $DESC" "$NAME"
-        do_start
-        case "$?" in
-            0|1) log_end_msg 0 ;;
-            2) log_end_msg 1 ;;
-        esac
-        ;;
-  stop)
-       log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) log_end_msg 0 ;;
-               2) log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  systemd-start)
-      do_start
-       ;;
-  systemd-stop)
-      do_stop
-      ;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        do_stop
-        case "$?" in
-            0|1)
-                do_start
-                case "$?" in
-                    0) log_end_msg 0 ;;
-                    1) log_end_msg 1 ;; # Old process is still running
-                    *) log_end_msg 1 ;; # Failed to start
-                esac
-                ;;
-            *)
-            # Failed to stop
-                log_end_msg 1
-                ;;
-        esac
-        ;;
-
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
diff --git a/debian/neutron-vpn-agent.init.in b/debian/neutron-vpn-agent.init.in
new file mode 100644 (file)
index 0000000..053c2ca
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          neutron-vpn-agent
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Should-Stop:       mysql postgresql rabbitmq-server keystone openvswitch-switch
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Neutron VPN Agent agent
+# Description:       Provides VPN agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron VPN Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-vpn-agent
+DAEMON=/usr/bin/${NAME}
+# --config-file=/etc/neutron/neutron.conf will be happened 
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/vpn_agent.ini"
index 70adb899f9918c045d9c3cb8b4fafa374aa894b6..bb1796685b7efe3f09b0c62a625ce640f992cec4 100644 (file)
@@ -1,4 +1,4 @@
-/var/log/neutron/vpn-agent.log {
+/var/log/neutron/neutron-vpn-agent.log {
     daily
     missingok
     compress
diff --git a/debian/neutron-vpn-agent.service b/debian/neutron-vpn-agent.service
deleted file mode 100644 (file)
index adcdec5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Networking service - VPN Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-vpn-agent systemd-start
-ExecStop=/etc/init.d/neutron-vpn-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-vpn-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/debian/neutron-vpn-agent.upstart.in b/debian/neutron-vpn-agent.upstart.in
deleted file mode 100644 (file)
index 35e6b84..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-description "Neutron VPN plugin agent"
-author "Thomas Goirand <zigo@debian.org>"
-
-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 /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/vpn-agent.log"
-
-       exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-vpn-agent -- \
-                              --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini \
-                              $DAEMON_ARGS
-end script
index 6bf3f2df15e0e97df6a5e607478c3aa31180657c..8f82c596471beb19644e4e790701cd3234d5c5ef 100755 (executable)
@@ -1,15 +1,12 @@
 #!/usr/bin/make -f
 
-#export DH_VERBOSE=1
-
 include /usr/share/openstack-pkg-tools/pkgos.make
-
 export OSLO_PACKAGE_VERSION=$(VERSION)
 
 PYTHONS:=$(shell pyversions -vr)
 
 %:
-       dh $@ --buildsystem=python_distutils --with python2
+       dh $@ --buildsystem=python_distutils --with python2,systemd
 
 override_dh_auto_install:
        echo "Nothing to do!"
@@ -54,6 +51,7 @@ override_dh_auto_clean:
                debian/neutron-dhcp-agent.postinst \
                debian/neutron-metadata-agent.config \
                debian/neutron-metadata-agent.postinst
+       rm -f debian/*.init debian/*.service debian/*.upstart
 
 override_dh_clean:
        dh_clean