On n'ecrit plus dans check a l'ecran (on ne recoit donc plus de mail) sauf si aucun moyen de communication n'est defini

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@415 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2011-12-16 08:16:06 +00:00
parent ccf283ba1a
commit 6690483b5a

8
check
View File

@@ -50,6 +50,10 @@ function checklog()
echo $rc
fi
fi
if [ "$alerteAudio" != "TRUE" ] && [ "$alerteNotify" != "TRUE" ]; then
# Si aucun moyen de communication n'est demandé, on écrit à l'écran
echo "$@"
fi
}
function testps()
@@ -145,7 +149,6 @@ function testdf()
filesys=`echo $ligne | awk '{print $6}'`
if [ $fs_space -gt $limite ]; then
checklog "Systeme de fichier $filesys plein a $fs_space %"
echo "Systeme de fichier $filesys plein a $fs_space %"
fi
done
}
@@ -200,14 +203,12 @@ function testMount()
MNT=`egrep -v "^{none|rootfs|binfmt_misc|gvfs-fuse-daemon} " /proc/mounts | cut -d " " -f 2 | egrep "^$PNT$"`
if [ "$MNT" == "" ]; then
checklog "Disque $PNT non monte : remonte"
echo "Disque $PNT non monte : remonte"
mount $PNT
fi
ST=`egrep -v "^{none|rootfs|binfmt_misc|gvfs-fuse-daemon} " /proc/mounts | cut -d " " -f 2,4| egrep "^$PNT " | cut -d " " -f 2 | cut -d "," -f 1`
if [ "$ST" == "ro" ]; then
checklog "Disque $PNT en RO : Passage en RW"
echo "Disque $PNT en RO : Passage en RW"
mount -o remount,rw $PNT
fi
}
@@ -218,7 +219,6 @@ function testRepertoireVide()
REP=$1
if [ "`ls -1 $REP`" != "" ]; then
checklog "Repertoire $1 non vide"
echo "Repertoire $1 non vide :"
ls -1 $REP
fi
}