projects
/
mirror
/
dsa-nagios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c80f48b
)
sort hash keys
author
Peter Palfrader
<peter@palfrader.org>
Sun, 24 Feb 2013 15:59:26 +0000
(16:59 +0100)
committer
Peter Palfrader
<peter@palfrader.org>
Sun, 24 Feb 2013 15:59:26 +0000
(16:59 +0100)
config/build-nagios
patch
|
blob
|
history
diff --git
a/config/build-nagios
b/config/build-nagios
index
280542a
..
312ba87
100755
(executable)
--- a/
config/build-nagios
+++ b/
config/build-nagios
@@
-130,12
+130,12
@@
$nrpe = Nrpe.new()
# and also skips private keys (those starting with an underscore)
def print_block(fd, kind, hash, exclude_keys)
fd.puts "define #{kind} {"
- hash.
each_pair{ |key, value
|
+ hash.
keys.sort.each{ |key
|
next if key == '_extinfo'
next if key == '_hostgroups'
next if key == '_memberlist'
next if exclude_keys.include? key
- fd.puts " #{key} #{
value
}"
+ fd.puts " #{key} #{
hash[key]
}"
}
fd.puts "}"
fd.puts