diff --git a/munin/scripts/link_plugins.py b/munin/scripts/link_plugins.py index 429a3cbd..5edc16e1 100755 --- a/munin/scripts/link_plugins.py +++ b/munin/scripts/link_plugins.py @@ -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',