tags 690711 + patch
thanks

Hi,

Raphael Geissert wrote (16 Oct 2012 17:49:31 GMT) :
> checkbashisms' output:
>>possible bashism in ./usr/share/munin/plugins/selinux_avcstat line 88 (read 
> without variable):
>>    { read

The attached patch fixes this bashism. I'm not using SELinux, so
I could not test the resulting behaviour is correct.

Cheers,
--
  intrigeri
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc

>From 31c03a731a5d3a1711f6238124ae89d7a4728a27 Mon Sep 17 00:00:00 2001
From: intrigeri <[email protected]>
Date: Wed, 21 Nov 2012 10:05:15 +0100
Subject: [PATCH] Do not use the "read without variable" bashism.

---
 plugins/node.d.linux/selinux_avcstat.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/node.d.linux/selinux_avcstat.in b/plugins/node.d.linux/selinux_avcstat.in
index dc436ef..92abf13 100644
--- a/plugins/node.d.linux/selinux_avcstat.in
+++ b/plugins/node.d.linux/selinux_avcstat.in
@@ -85,7 +85,7 @@ if [ "$1" = "config" ]; then
 fi
 
 if [ -r $AVCSTATS ]; then
-    { read
+    { read HEADER
       while read lookups hits misses allocations reclaims frees; do
         LOOKUPS=$(($LOOKUPS + $lookups))
         HITS=$(($HITS + $hits))
-- 
1.7.10.4

Reply via email to