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-all | 2 +- meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth | 2 +- meta-openstack/recipes-devtools/python/python-nova/nova.init | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'meta-openstack/recipes-devtools/python/python-nova') diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-all b/meta-openstack/recipes-devtools/python/python-nova/nova-all index c1d537d..914b714 100644 --- a/meta-openstack/recipes-devtools/python/python-nova/nova-all +++ b/meta-openstack/recipes-devtools/python/python-nova/nova-all @@ -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 diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth index 99f04d5..9a74107 100644 --- a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth +++ b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth @@ -48,7 +48,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-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