summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-cinder
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-cinder
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-cinder')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder/cinder-volume19
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder/cinder.init19
2 files changed, 34 insertions, 4 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume b/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume
index 3cc2aa3..2c9334e 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume
+++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume
@@ -56,6 +56,18 @@ stop()
56 rm -f $PIDFILE 56 rm -f $PIDFILE
57} 57}
58 58
59status()
60{
61 pid=`cat $PIDFILE 2>/dev/null`
62 if [ -n "$pid" ]; then
63 if ps -p $pid >&- ; then
64 echo "$DESC is running"
65 return
66 fi
67 fi
68 echo "$DESC is not running"
69}
70
59case "$1" in 71case "$1" in
60 start) 72 start)
61 start 73 start
@@ -63,12 +75,15 @@ case "$1" in
63 stop) 75 stop)
64 stop 76 stop
65 ;; 77 ;;
66 restart|force-reload) 78 restart|force-reload|reload)
67 stop 79 stop
68 start 80 start
69 ;; 81 ;;
82 status)
83 status
84 ;;
70 *) 85 *)
71 echo "Usage: $0 {start|stop|force-reload|restart}" 86 echo "Usage: $0 {start|stop|force-reload|restart|reload|status}"
72 exit 1 87 exit 1
73 ;; 88 ;;
74esac 89esac
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/cinder.init b/meta-openstack/recipes-devtools/python/python-cinder/cinder.init
index 7ae3dbf..0a3923a 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder/cinder.init
+++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder.init
@@ -54,6 +54,18 @@ stop()
54 rm -f $PIDFILE 54 rm -f $PIDFILE
55} 55}
56 56
57status()
58{
59 pid=`cat $PIDFILE 2>/dev/null`
60 if [ -n "$pid" ]; then
61 if ps -p $pid >&- ; then
62 echo "$DESC is running"
63 return
64 fi
65 fi
66 echo "$DESC is not running"
67}
68
57case "$1" in 69case "$1" in
58 start) 70 start)
59 start 71 start
@@ -61,12 +73,15 @@ case "$1" in
61 stop) 73 stop)
62 stop 74 stop
63 ;; 75 ;;
64 restart|force-reload) 76 restart|force-reload|reload)
65 stop 77 stop
66 start 78 start
67 ;; 79 ;;
80 status)
81 status
82 ;;
68 *) 83 *)
69 echo "Usage: $0 {start|stop|force-reload|restart}" 84 echo "Usage: $0 {start|stop|force-reload|restart|reload|status}"
70 exit 1 85 exit 1
71 ;; 86 ;;
72esac 87esac