]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Re-added ubuntu upstart files using the .in extension.
authorThomas Goirand <thomas@goirand.fr>
Tue, 9 Oct 2012 09:15:50 +0000 (09:15 +0000)
committerThomas Goirand <thomas@goirand.fr>
Tue, 9 Oct 2012 09:15:50 +0000 (09:15 +0000)
Rewritten-From: 109e582a8712368c71a37f4d9f8c5a7b5b1b4ea4

xenial/debian/cinder-api.upstart.in [new file with mode: 0644]
xenial/debian/cinder-scheduler.upstart.in [new file with mode: 0644]
xenial/debian/cinder-volume.upstart.in [new file with mode: 0644]
xenial/debian/rules

diff --git a/xenial/debian/cinder-api.upstart.in b/xenial/debian/cinder-api.upstart.in
new file mode 100644 (file)
index 0000000..1fbeb32
--- /dev/null
@@ -0,0 +1,17 @@
+description "Cinder api 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/cinder
+    chown cinder:cinder /var/run/cinder
+
+    mkdir -p /var/lock/cinder
+    chown cinder:root /var/lock/cinder
+end script
+
+exec su -s /bin/sh -c "exec cinder-api --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-api.log" cinder
diff --git a/xenial/debian/cinder-scheduler.upstart.in b/xenial/debian/cinder-scheduler.upstart.in
new file mode 100644 (file)
index 0000000..d03cb4e
--- /dev/null
@@ -0,0 +1,17 @@
+description "Cinder scheduler 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/cinder
+    chown cinder:cinder /var/run/cinder
+
+    mkdir -p /var/lock/cinder
+    chown cinder:root /var/lock/cinder
+end script
+
+exec su -s /bin/sh -c "exec cinder-scheduler --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-scheduler.log" cinder
diff --git a/xenial/debian/cinder-volume.upstart.in b/xenial/debian/cinder-volume.upstart.in
new file mode 100644 (file)
index 0000000..9544ec7
--- /dev/null
@@ -0,0 +1,17 @@
+description "Cinder volume 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/cinder
+    chown cinder:cinder /var/run/cinder
+
+    mkdir -p /var/lock/cinder
+    chown cinder:root /var/lock/cinder
+end script
+
+exec su -s /bin/sh -c "exec cinder-volume --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-volume.log" cinder
index 2076c6de036996c8e7390f81181a80f46f9c9520..50db4c1003e4d6adde79611d3b2f20af45acaaf4 100755 (executable)
@@ -14,6 +14,15 @@ override_dh_auto_test:
        ./run_tests.sh -N -P || true
 endif
 
+override_dh_installinit:
+       if dpkg-vendor --derives-from ubuntu ; then \
+               for i in *.upstart.in ; do \
+                       MYPKG=`echo $i | cut -d. -f1` ; \
+                       cp $MYPKG.upstart.in $MYPKG.upstart ; \
+               done ; \
+       fi
+       dh_installinit --error-handler=true
+
 # Checkout master repo and create the orig.tar.xz
 get-vcs-source:
        git remote add upstream git://github.com/openstack/cinder.git || true