File: 102-snort-bashism.patch

package info (click to toggle)
munin 1.4.5-3+deb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 4,988 kB
  • ctags: 806
  • sloc: perl: 8,936; sh: 3,105; java: 1,754; makefile: 585; python: 143
file content (128 lines) | stat: -rw-r--r-- 4,898 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Description: snort_* scripts fail to 'config' due to bashism
 This patch can be removed for munin 1.4.6/2.0.0 and up.
Origin: http://bugs.debian.org/595899
Bug-Debian: http://bugs.debian.org/595899
Forwarded: yes (included in branch-1.4: r3884 , trunk: r3885)
Author: Gerald Turner <gturner@unzane.com>
Last-Update: 2010-09-09
Index: munin-1.4.5/plugins/node.d/snort_traffic.in
===================================================================
--- munin-1.4.5.orig/plugins/node.d/snort_traffic.in	(revision 3884)
+++ munin-1.4.5/plugins/node.d/snort_traffic.in	(working copy)
@@ -78,11 +78,11 @@
         echo 'graph_vlabel Mbits / second'
         echo 'graph_scale no'
         echo 'traffic.label Mbits/second'
-	if [ -n $warning ]; then
-		echo 'traffic.warning $warning'
+	if [ -n "$warning" ]; then
+		echo "traffic.warning $warning"
 	fi
-	if [ -n $critical ]; then
-		echo 'traffic.critical $critical'
+	if [ -n "$critical" ]; then
+		echo "traffic.critical $critical"
 	fi
         echo 'traffic.info Traffic in Mbites per second'
         echo 'graph_category Snort'
Index: munin-1.4.5/plugins/node.d/snort_bytes_pkt.in
===================================================================
--- munin-1.4.5.orig/plugins/node.d/snort_bytes_pkt.in	(revision 3884)
+++ munin-1.4.5/plugins/node.d/snort_bytes_pkt.in	(working copy)
@@ -78,11 +78,11 @@
         echo 'graph_vlabel KBytes / pkt'
         echo 'graph_scale no'
         echo 'bytes_pkt.label KBytes/pkt'
-	if [ -n $warning ]; then
-		echo 'bytes_pkt.warning $warning'
+	if [ -n "$warning" ]; then
+		echo "bytes_pkt.warning $warning"
 	fi
-	if [ -n $critical ]; then
-		echo 'bytes_pkt.critical $critical'
+	if [ -n "$critical" ]; then
+		echo "bytes_pkt.critical $critical"
 	fi
         echo 'bytes_pkt.info Average size per packet'
         echo 'graph_category Snort'
Index: munin-1.4.5/plugins/node.d/snort_alerts.in
===================================================================
--- munin-1.4.5.orig/plugins/node.d/snort_alerts.in	(revision 3884)
+++ munin-1.4.5/plugins/node.d/snort_alerts.in	(working copy)
@@ -78,11 +78,11 @@
         echo 'graph_vlabel Alerts / second'
         echo 'graph_scale no'
         echo 'alerts.label Alerts/second'
-	if [ -n $warning ]; then
-		echo 'alerts.warning $warning'
+	if [ -n "$warning" ]; then
+		echo "alerts.warning $warning"
 	fi
-	if [ -n $critical ]; then
-		echo 'alerts.critical $critical'
+	if [ -n "$critical" ]; then
+		echo "alerts.critical $critical"
 	fi
         echo 'alerts.info The number of alerts per second'
         echo 'graph_category Snort'
Index: munin-1.4.5/plugins/node.d/snort_pattern_match.in
===================================================================
--- munin-1.4.5.orig/plugins/node.d/snort_pattern_match.in	(revision 3884)
+++ munin-1.4.5/plugins/node.d/snort_pattern_match.in	(working copy)
@@ -79,11 +79,11 @@
         echo 'graph_vlabel % percent'
         echo 'graph_scale no'
         echo 'pattmatch.label % percent'
-	if [ -n $warning ]; then
-		echo 'pattmatch.warning $warning'
+	if [ -n "$warning" ]; then
+		echo "pattmatch.warning $warning"
 	fi
-	if [ -n $critical ]; then
-		echo 'pattmatch.critical $critical'
+	if [ -n "$critical" ]; then
+		echo "pattmatch.critical $critical"
 	fi
         echo 'pattmatch.info The percent of data received that Snort processes in pattern matching'
         echo 'graph_category Snort'
Index: munin-1.4.5/plugins/node.d/snort_pkts.in
===================================================================
--- munin-1.4.5.orig/plugins/node.d/snort_pkts.in	(revision 3884)
+++ munin-1.4.5/plugins/node.d/snort_pkts.in	(working copy)
@@ -79,11 +79,11 @@
         echo 'graph_vlabel Packets / second'
         echo 'graph_scale no'
         echo 'pktsec.label Packets/second'
-	if [ -n $warning ]; then
-		echo 'pktsec.warning $warning'
+	if [ -n "$warning" ]; then
+		echo "pktsec.warning $warning"
 	fi
-	if [ -n $critical ]; then
-		echo 'pktsec.critical $critical'
+	if [ -n "$critical" ]; then
+		echo "pktsec.critical $critical"
 	fi
         echo 'pktsec.info The number of packets per second'
         echo 'graph_category Snort'
Index: munin-1.4.5/plugins/node.d/snort_drop_rate.in
===================================================================
--- munin-1.4.5.orig/plugins/node.d/snort_drop_rate.in	(revision 3884)
+++ munin-1.4.5/plugins/node.d/snort_drop_rate.in	(working copy)
@@ -78,11 +78,11 @@
         echo 'graph_vlabel % percent'
         echo 'graph_scale no'
         echo 'droprate.label % percent'
-	if [ -n $warning ]; then
-		echo 'droprate.warning $warning'
+	if [ -n "$warning" ]; then
+		echo "droprate.warning $warning"
 	fi
-	if [ -n $critical ]; then
-		echo 'droprate.critical $critical'
+	if [ -n "$critical" ]; then
+		echo "droprate.critical $critical"
 	fi
         echo 'droprate.info Packet drop rate in %'
         echo 'graph_category Snort'