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