diff options
| author | Amy Fong <amy.fong@windriver.com> | 2014-03-17 14:14:48 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-03-17 15:27:41 -0400 |
| commit | 9a74961bafabc404f015fc5d8a9da969d263dad3 (patch) | |
| tree | edc0caa250166b128c89f606d17373c75e233d26 /meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init | |
| parent | 71ef5b7acb5815c678cda0c115e98e6b1d06e1aa (diff) | |
| download | meta-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-neutron/neutron-agent.init')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init b/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init index f575746..e02ea9e 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init +++ b/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init | |||
| @@ -50,6 +50,18 @@ stop() | |||
| 50 | rm -f $PIDFILE | 50 | rm -f $PIDFILE |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | status() | ||
| 54 | { | ||
| 55 | pid=`cat $PIDFILE 2>/dev/null` | ||
| 56 | if [ -n "$pid" ]; then | ||
| 57 | if ps -p $pid >&- ; then | ||
| 58 | echo "$DESC is running" | ||
| 59 | return | ||
| 60 | fi | ||
| 61 | fi | ||
| 62 | echo "$DESC is not running" | ||
| 63 | } | ||
| 64 | |||
| 53 | case "$1" in | 65 | case "$1" in |
| 54 | start) | 66 | start) |
| 55 | start | 67 | start |
| @@ -57,12 +69,15 @@ case "$1" in | |||
| 57 | stop) | 69 | stop) |
| 58 | stop | 70 | stop |
| 59 | ;; | 71 | ;; |
| 60 | restart|force-reload) | 72 | restart|force-reload|reload) |
| 61 | stop | 73 | stop |
| 62 | start | 74 | start |
| 63 | ;; | 75 | ;; |
| 76 | status) | ||
| 77 | status | ||
| 78 | ;; | ||
| 64 | *) | 79 | *) |
| 65 | echo "Usage: $0 {start|stop|force-reload|restart}" | 80 | echo "Usage: $0 {start|stop|force-reload|restart|reload|status}" |
| 66 | exit 1 | 81 | exit 1 |
| 67 | ;; | 82 | ;; |
| 68 | esac | 83 | esac |
