diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2015-11-11 21:50:27 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2015-11-16 15:11:44 -0500 |
commit | d0206f9f16905937397f27fb8c18a46331d13056 (patch) | |
tree | cf4a620a5862e3b982879e91d6115c0a9f1b39d2 | |
parent | 7e7a276184912dbd5f9eca81cdc76875a64b1b13 (diff) | |
download | meta-cloud-services-d0206f9f16905937397f27fb8c18a46331d13056.tar.gz |
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 <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
15 files changed, 15 insertions, 15 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-barbican/barbican.init b/meta-openstack/recipes-devtools/python/python-barbican/barbican.init index 5b353e1..a23a493 100644 --- a/meta-openstack/recipes-devtools/python/python-barbican/barbican.init +++ b/meta-openstack/recipes-devtools/python/python-barbican/barbican.init | |||
@@ -71,7 +71,7 @@ status() | |||
71 | { | 71 | { |
72 | pid=`cat $PIDFILE 2>/dev/null` | 72 | pid=`cat $PIDFILE 2>/dev/null` |
73 | if [ -n "$pid" ]; then | 73 | if [ -n "$pid" ]; then |
74 | if ps -p $pid >&- ; then | 74 | if ps -p $pid > /dev/null 2>&1 ; then |
75 | echo "$DESC is running" | 75 | echo "$DESC is running" |
76 | return | 76 | return |
77 | fi | 77 | fi |
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() | |||
62 | { | 62 | { |
63 | pid=`cat $PIDFILE 2>/dev/null` | 63 | pid=`cat $PIDFILE 2>/dev/null` |
64 | if [ -n "$pid" ]; then | 64 | if [ -n "$pid" ]; then |
65 | if ps -p $pid >&- ; then | 65 | if ps -p $pid > /dev/null 2>&1; then |
66 | echo "$DESC is running" | 66 | echo "$DESC is running" |
67 | return | 67 | return |
68 | fi | 68 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume b/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume index f753810..7d0aa14 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume +++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume | |||
@@ -61,7 +61,7 @@ status() | |||
61 | { | 61 | { |
62 | pid=`cat $PIDFILE 2>/dev/null` | 62 | pid=`cat $PIDFILE 2>/dev/null` |
63 | if [ -n "$pid" ]; then | 63 | if [ -n "$pid" ]; then |
64 | if ps -p $pid >&- ; then | 64 | if ps -p $pid > /dev/null 2>&1 ; then |
65 | echo "$DESC is running" | 65 | echo "$DESC is running" |
66 | return | 66 | return |
67 | fi | 67 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/cinder.init b/meta-openstack/recipes-devtools/python/python-cinder/cinder.init index f130ac8..4c97962 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder/cinder.init +++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder.init | |||
@@ -63,7 +63,7 @@ status() | |||
63 | { | 63 | { |
64 | pid=`cat $PIDFILE 2>/dev/null` | 64 | pid=`cat $PIDFILE 2>/dev/null` |
65 | if [ -n "$pid" ]; then | 65 | if [ -n "$pid" ]; then |
66 | if ps -p $pid >&- ; then | 66 | if ps -p $pid > /dev/null 2>&1 ; then |
67 | echo "$DESC is running" | 67 | echo "$DESC is running" |
68 | return | 68 | return |
69 | fi | 69 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-glance/glance.init b/meta-openstack/recipes-devtools/python/python-glance/glance.init index 5b1bf74..cbcfb0a 100644 --- a/meta-openstack/recipes-devtools/python/python-glance/glance.init +++ b/meta-openstack/recipes-devtools/python/python-glance/glance.init | |||
@@ -62,7 +62,7 @@ status() | |||
62 | { | 62 | { |
63 | pid=`cat $PIDFILE 2>/dev/null` | 63 | pid=`cat $PIDFILE 2>/dev/null` |
64 | if [ -n "$pid" ]; then | 64 | if [ -n "$pid" ]; then |
65 | if ps -p $pid >&- ; then | 65 | if ps -p $pid > /dev/null 2>&1 ; then |
66 | echo "$DESC is running" | 66 | echo "$DESC is running" |
67 | return | 67 | return |
68 | fi | 68 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-heat/heat.init b/meta-openstack/recipes-devtools/python/python-heat/heat.init index 5e0719f..794ac6a 100644 --- a/meta-openstack/recipes-devtools/python/python-heat/heat.init +++ b/meta-openstack/recipes-devtools/python/python-heat/heat.init | |||
@@ -68,7 +68,7 @@ status() | |||
68 | { | 68 | { |
69 | pid=`cat $PIDFILE 2>/dev/null` | 69 | pid=`cat $PIDFILE 2>/dev/null` |
70 | if [ -n "$pid" ]; then | 70 | if [ -n "$pid" ]; then |
71 | if ps -p $pid >&- ; then | 71 | if ps -p $pid > /dev/null 2>&1 ; then |
72 | echo "$DESC is running" | 72 | echo "$DESC is running" |
73 | return | 73 | return |
74 | fi | 74 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-horizon/horizon.init b/meta-openstack/recipes-devtools/python/python-horizon/horizon.init index 994fbec..be79353 100644 --- a/meta-openstack/recipes-devtools/python/python-horizon/horizon.init +++ b/meta-openstack/recipes-devtools/python/python-horizon/horizon.init | |||
@@ -58,7 +58,7 @@ status() | |||
58 | { | 58 | { |
59 | pid=`cat $PIDFILE 2>/dev/null` | 59 | pid=`cat $PIDFILE 2>/dev/null` |
60 | if [ -n "$pid" ]; then | 60 | if [ -n "$pid" ]; then |
61 | if ps -p $pid >&- ; then | 61 | if ps -p $pid > /dev/null 2>&1 ; then |
62 | echo "$DESC is running" | 62 | echo "$DESC is running" |
63 | return | 63 | return |
64 | fi | 64 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-keystone/keystone b/meta-openstack/recipes-devtools/python/python-keystone/keystone index 8953da8..0d8a538 100644 --- a/meta-openstack/recipes-devtools/python/python-keystone/keystone +++ b/meta-openstack/recipes-devtools/python/python-keystone/keystone | |||
@@ -59,7 +59,7 @@ status() | |||
59 | { | 59 | { |
60 | pid=`cat $PIDFILE 2>/dev/null` | 60 | pid=`cat $PIDFILE 2>/dev/null` |
61 | if [ -n "$pid" ]; then | 61 | if [ -n "$pid" ]; then |
62 | if ps -p $pid >&- ; then | 62 | if ps -p $pid > /dev/null 2>&1 ; then |
63 | echo "$DESC is running" | 63 | echo "$DESC is running" |
64 | return | 64 | return |
65 | fi | 65 | fi |
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() | |||
60 | { | 60 | { |
61 | pid=`cat $PIDFILE 2>/dev/null` | 61 | pid=`cat $PIDFILE 2>/dev/null` |
62 | if [ -n "$pid" ]; then | 62 | if [ -n "$pid" ]; then |
63 | if ps -p $pid >&- ; then | 63 | if ps -p $pid > /dev/null 2>&1 ; then |
64 | echo "$DESC is running" | 64 | echo "$DESC is running" |
65 | return | 65 | return |
66 | fi | 66 | 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() | |||
63 | { | 63 | { |
64 | pid=`cat $PIDFILE 2>/dev/null` | 64 | pid=`cat $PIDFILE 2>/dev/null` |
65 | if [ -n "$pid" ]; then | 65 | if [ -n "$pid" ]; then |
66 | if ps -p $pid >&- ; then | 66 | if ps -p $pid > /dev/null 2>&1 ; then |
67 | echo "$DESC is running" | 67 | echo "$DESC is running" |
68 | return | 68 | return |
69 | fi | 69 | fi |
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() | |||
62 | { | 62 | { |
63 | pid=`cat $PIDFILE 2>/dev/null` | 63 | pid=`cat $PIDFILE 2>/dev/null` |
64 | if [ -n "$pid" ]; then | 64 | if [ -n "$pid" ]; then |
65 | if ps -p $pid >&- ; then | 65 | if ps -p $pid > /dev/null 2>&1 ; then |
66 | echo "$DESC is running" | 66 | echo "$DESC is running" |
67 | return | 67 | return |
68 | fi | 68 | 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() | |||
48 | { | 48 | { |
49 | pid=`cat $PIDFILE 2>/dev/null` | 49 | pid=`cat $PIDFILE 2>/dev/null` |
50 | if [ -n "$pid" ]; then | 50 | if [ -n "$pid" ]; then |
51 | if ps -p $pid >&- ; then | 51 | if ps -p $pid > /dev/null 2>&1 ; then |
52 | echo "$DESC is running" | 52 | echo "$DESC is running" |
53 | return | 53 | return |
54 | fi | 54 | 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() | |||
78 | { | 78 | { |
79 | pid=`cat $PIDFILE 2>/dev/null` | 79 | pid=`cat $PIDFILE 2>/dev/null` |
80 | if [ -n "$pid" ]; then | 80 | if [ -n "$pid" ]; then |
81 | if ps -p $pid >&- ; then | 81 | if ps -p $pid > /dev/null 2>&1 ; then |
82 | echo "$DESC is running" | 82 | echo "$DESC is running" |
83 | return | 83 | return |
84 | fi | 84 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-rally/rally.init b/meta-openstack/recipes-devtools/python/python-rally/rally.init index e834547..6128e48 100644 --- a/meta-openstack/recipes-devtools/python/python-rally/rally.init +++ b/meta-openstack/recipes-devtools/python/python-rally/rally.init | |||
@@ -63,7 +63,7 @@ status() | |||
63 | { | 63 | { |
64 | pid=`cat $PIDFILE 2>/dev/null` | 64 | pid=`cat $PIDFILE 2>/dev/null` |
65 | if [ -n "$pid" ]; then | 65 | if [ -n "$pid" ]; then |
66 | if ps -p $pid >&- ; then | 66 | if ps -p $pid > /dev/null 2>&1 ; then |
67 | echo "$DESC is running" | 67 | echo "$DESC is running" |
68 | return | 68 | return |
69 | fi | 69 | fi |
diff --git a/meta-openstack/recipes-devtools/python/python-trove/trove-init b/meta-openstack/recipes-devtools/python/python-trove/trove-init index 584bf77..ee0bd21 100644 --- a/meta-openstack/recipes-devtools/python/python-trove/trove-init +++ b/meta-openstack/recipes-devtools/python/python-trove/trove-init | |||
@@ -73,7 +73,7 @@ status() | |||
73 | { | 73 | { |
74 | pid=`cat $PIDFILE 2>/dev/null` | 74 | pid=`cat $PIDFILE 2>/dev/null` |
75 | if [ -n "$pid" ]; then | 75 | if [ -n "$pid" ]; then |
76 | if ps -p $pid >&- ; then | 76 | if ps -p $pid > /dev/null 2>&1 ; then |
77 | echo "$DESC is running" | 77 | echo "$DESC is running" |
78 | return | 78 | return |
79 | fi | 79 | fi |