From d0206f9f16905937397f27fb8c18a46331d13056 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-ceilometer/ceilometer.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-openstack/recipes-devtools/python/python-ceilometer') diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.init b/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.init index ba0f426..80fdff5 100644 --- a/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.init +++ b/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.init @@ -62,7 +62,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