summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-glance
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-03-17 14:14:48 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-03-17 15:27:41 -0400
commit9a74961bafabc404f015fc5d8a9da969d263dad3 (patch)
treeedc0caa250166b128c89f606d17373c75e233d26 /meta-openstack/recipes-devtools/python/python-glance
parent71ef5b7acb5815c678cda0c115e98e6b1d06e1aa (diff)
downloadmeta-cloud-services-9a74961bafabc404f015fc5d8a9da969d263dad3.tar.gz
OpenStack: Add to missing functionality in sysvinit scripts
Add status/reload to sysvinit scripts Modify tgtd to make start/stop work better (borrowed from Debian's implementation) Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-glance')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance/glance.init20
1 files changed, 18 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance/glance.init b/meta-openstack/recipes-devtools/python/python-glance/glance.init
index c61abaa..def500f 100644
--- a/meta-openstack/recipes-devtools/python/python-glance/glance.init
+++ b/meta-openstack/recipes-devtools/python/python-glance/glance.init
@@ -4,6 +4,7 @@
4# Provides: 4# Provides:
5# Required-Start: $remote_fs $network $syslog 5# Required-Start: $remote_fs $network $syslog
6# Required-Stop: $remote_fs $syslog 6# Required-Stop: $remote_fs $syslog
7# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6 8# Default-Stop: 0 1 6
8# Short-Description: Glance API server 9# Short-Description: Glance API server
9# Description: OpenStack Image Service (code-named Glance) API server 10# Description: OpenStack Image Service (code-named Glance) API server
@@ -57,6 +58,18 @@ stop()
57 rm -f $PIDFILE 58 rm -f $PIDFILE
58} 59}
59 60
61status()
62{
63 pid=`cat $PIDFILE 2>/dev/null`
64 if [ -n "$pid" ]; then
65 if ps -p $pid >&- ; then
66 echo "$DESC is running"
67 return
68 fi
69 fi
70 echo "$DESC is not running"
71}
72
60case "$1" in 73case "$1" in
61 start) 74 start)
62 start 75 start
@@ -64,12 +77,15 @@ case "$1" in
64 stop) 77 stop)
65 stop 78 stop
66 ;; 79 ;;
67 restart|force-reload) 80 restart|force-reload|reload)
68 stop 81 stop
69 start 82 start
70 ;; 83 ;;
84 status)
85 status
86 ;;
71 *) 87 *)
72 echo "Usage: $0 {start|stop|force-reload|restart}" 88 echo "Usage: $0 {start|stop|force-reload|restart|reload|status}"
73 exit 1 89 exit 1
74 ;; 90 ;;
75esac 91esac