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