From 0ce634069e6c87a2aca9a2f9f0365a905316270a Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Wed, 9 Feb 2011 00:41:05 +0100 Subject: [PATCH] =?UTF-8?q?[monit/services]=20D=C3=A9codage=20des=20uuids?= =?UTF-8?q?=20de=20block=20devices?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20110208234105-ffbb2-8252d59f1533d364386965ad4bdb153012424cfb.gz --- Python/etc/monit/services | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Python/etc/monit/services b/Python/etc/monit/services index 6813312..f3c77f0 100644 --- a/Python/etc/monit/services +++ b/Python/etc/monit/services @@ -205,6 +205,12 @@ for i in range(0,dernierecarte): if hostname in ['canard'] : done() +disques = {} +if has('blkid'): + for line in metadata.Probes["blkid"].splitlines(): + label, disque = line.strip().split() + disques[label] = disque + for line in metadata.Probes["fstab_local"].splitlines(): # on supprime les espaces line = line.strip() @@ -217,6 +223,7 @@ for line in metadata.Probes["fstab_local"].splitlines(): # on découpe la ligne [fs, mntpoint, type, options, dump, pass_] = re.split('[ \t]*',line) + fs = disques.get(fs, fs) options = options.split(",") # on saute si c'est une partition non montée au démarrage