1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -43,15 +43,15 @@ def output
agent = Mechanize.new
x = agent.get(router_path)
salt = x.body.match(/salt = "(.*)"/)[1]
# pad the pasword to length 16
pad_size = (16 - password.length)
padded_password = password + "\x01" * pad_size
# pad it the rest of the way, length 64 for user
salted_password = salt + padded_password + ("\x01" * (63 - salt.length - padded_password.length)) + "U"
login_hash = salt + Digest::MD5.hexdigest(salted_password)
# authenticate against the router using the hash that we just built
login_path = "#{router_path}/post_login.xml?hash=#{login_hash}"
x = agent.get(login_path)
@ -120,7 +120,7 @@ def output
puts "#{i}_coll.value " + nics[i]["tx_collisions"]
puts "#{i}_err.value " + nics[i]["rx_errors"]
end
# graph stats for each interface
for i in [ "LAN", "WAN", "WLAN" ] do
puts "multigraph if_packets.#{i}"
@ -215,7 +215,7 @@ def config
puts 'send.type DERIVE'
puts 'send.negative recv'
puts 'send.min 0'
puts "multigraph if_drop.#{i}"
puts "graph_title D-Link DIR-655 #{i} drops"
puts 'graph_category network'
@ -229,7 +229,7 @@ def config
puts 'send.type DERIVE'
puts 'send.negative recv'
puts 'send.min 0'
puts "multigraph if_collerr.#{i}"
puts "graph_title D-Link DIR-655 #{i} collisions & errors"
puts 'graph_category network'