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 --- meta-openstack/recipes-devtools/python/python-nova/nova.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova.init') diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova.init b/meta-openstack/recipes-devtools/python/python-nova/nova.init index 46b28d3..607b6de 100644 --- a/meta-openstack/recipes-devtools/python/python-nova/nova.init +++ b/meta-openstack/recipes-devtools/python/python-nova/nova.init @@ -78,7 +78,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