[munin/link_plugins.py] Utilisation d'un postfix_mailstats correct sous etch
Ignore-this: 482f57e83b182ccf6bcc64af900e5a9d darcs-hash:20090329203220-ffbb2-7adc78b92a631cfc06e54580afabae727bf6de83.gz
This commit is contained in:
parent
c5336ea883
commit
446d07e5ee
1 changed files with 14 additions and 0 deletions
|
@ -160,6 +160,20 @@ def add_ifaces(plugins):
|
|||
plugins['if_%s' % interface] = os.path.join(MUNIN_PATH,'if_')
|
||||
plugins['if_err_%s' % interface] = os.path.join(MUNIN_PATH, 'if_err_')
|
||||
|
||||
@register_quirk
|
||||
def use_correct_postfix_mailstats(plugins):
|
||||
"""Utilise un postfix_mailstats non buggué sur etch"""
|
||||
if "postfix_mailstats" in plugins:
|
||||
try:
|
||||
debver_file = open('/etc/debian_version')
|
||||
except IOError:
|
||||
return
|
||||
else:
|
||||
debver = debver_file.read()
|
||||
debver_file.close()
|
||||
if debver.startswith('4'):
|
||||
plugins["postfix_mailstats"] = "/usr/scripts/munin/postfix_mailstats"
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option('-d', '--directory',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue