From 2883633858605df7bf50cc5ca68012291751d772 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Wed, 11 Nov 2015 21:50:27 -0500 Subject: init: no need to close (non-existing) ps file descriptors Attempting to get the status of various daemons which are part of the compute image results in an error: ps: write error: Bad file descriptor Switch to using the more standard io redirection techniques to avoid this error. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- .../recipes-devtools/python/python-neutron/neutron-agent.init | 2 +- .../recipes-devtools/python/python-neutron/neutron-server.init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'meta-openstack/recipes-devtools/python/python-neutron') 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 8b11a27..c9d8d72 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init +++ b/meta-openstack/recipes-devtools/python/python-neutron/neutron-agent.init @@ -60,7 +60,7 @@ status() { pid=`cat $PIDFILE 2>/dev/null` if [ -n "$pid" ]; then - if ps -p $pid >&- ; then + if ps -p $pid > /dev/null 2>&1 ; then echo "$DESC is running" return fi diff --git a/meta-openstack/recipes-devtools/python/python-neutron/neutron-server.init b/meta-openstack/recipes-devtools/python/python-neutron/neutron-server.init index 0c78de6..77f8f01 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron/neutron-server.init +++ b/meta-openstack/recipes-devtools/python/python-neutron/neutron-server.init @@ -63,7 +63,7 @@ status() { pid=`cat $PIDFILE 2>/dev/null` if [ -n "$pid" ]; then - if ps -p $pid >&- ; then + if ps -p $pid > /dev/null 2>&1 ; then echo "$DESC is running" return fi -- cgit v1.2.3-54-g00ecf