summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova
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
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')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-all19
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth19
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy19
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova.init19
4 files changed, 66 insertions, 10 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
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
index 13ad285..56561db 100644
--- a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth
@@ -43,6 +43,19 @@ if ! [ -x ${DAEMON} ] ; then
43 exit 0 43 exit 0
44fi 44fi
45 45
46DESC="nova console"
47status()
48{
49 pid=`cat $PIDFILE 2>/dev/null`
50 if [ -n "$pid" ]; then
51 if ps -p $pid >&- ; then
52 echo "$DESC is running"
53 return
54 fi
55 fi
56 echo "$DESC is not running"
57}
58
46case "$1" in 59case "$1" in
47 start) 60 start)
48 test "$ENABLED" = "true" || exit 0 61 test "$ENABLED" = "true" || exit 0
@@ -56,7 +69,7 @@ case "$1" in
56 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} 69 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE}
57 log_end_msg $? 70 log_end_msg $?
58 ;; 71 ;;
59 restart|force-reload) 72 restart|force-reload|reload)
60 test "$ENABLED" = "true" || exit 1 73 test "$ENABLED" = "true" || exit 1
61 $0 stop 74 $0 stop
62 sleep 1 75 sleep 1
@@ -64,10 +77,10 @@ case "$1" in
64 ;; 77 ;;
65 status) 78 status)
66 test "$ENABLED" = "true" || exit 0 79 test "$ENABLED" = "true" || exit 0
67 status_of_proc -p $PIDFILE $DAEMON nova-consoleauth && exit 0 || exit $? 80 status
68 ;; 81 ;;
69 *) 82 *)
70 echo "Usage: /etc/init.d/nova-consoleauth {start|stop|restart|force-reload|status}" 83 echo "Usage: /etc/init.d/nova-consoleauth {start|stop|restart|force-reload|status|reload|status}"
71 exit 1 84 exit 1
72 ;; 85 ;;
73esac 86esac
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
index 76cd1df..c976194 100644
--- a/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
@@ -40,6 +40,19 @@ if ! [ -x ${DAEMON} ] ; then
40 exit 0 40 exit 0
41fi 41fi
42 42
43DESC="nova vnc proxy"
44status()
45{
46 pid=`cat $PIDFILE 2>/dev/null`
47 if [ -n "$pid" ]; then
48 if ps -p $pid >&- ; then
49 echo "$DESC is running"
50 return
51 fi
52 fi
53 echo "$DESC is not running"
54}
55
43case "$1" in 56case "$1" in
44 start) 57 start)
45 test "$ENABLED" = "true" || exit 0 58 test "$ENABLED" = "true" || exit 0
@@ -53,7 +66,7 @@ case "$1" in
53 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} 66 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE}
54 log_end_msg $? 67 log_end_msg $?
55 ;; 68 ;;
56 restart|force-reload) 69 restart|force-reload|reload)
57 test "$ENABLED" = "true" || exit 1 70 test "$ENABLED" = "true" || exit 1
58 $0 stop 71 $0 stop
59 sleep 1 72 sleep 1
@@ -61,10 +74,10 @@ case "$1" in
61 ;; 74 ;;
62 status) 75 status)
63 test "$ENABLED" = "true" || exit 0 76 test "$ENABLED" = "true" || exit 0
64 status_of_proc -p $PIDFILE $DAEMON nova-novncproxy && exit 0 || exit $? 77 status
65 ;; 78 ;;
66 *) 79 *)
67 echo "Usage: /etc/init.d/nova-novncproxy {start|stop|restart|force-reload|status}" 80 echo "Usage: /etc/init.d/nova-novncproxy {start|stop|restart|force-reload|status|reload|status}"
68 exit 1 81 exit 1
69 ;; 82 ;;
70esac 83esac
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