2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Update quota2percent_ to V17.0213

fixed some slips
This commit is contained in:
JoHartmann 2017-02-12 17:56:49 +01:00 committed by GitHub
parent d24215d05e
commit 19a193ef11

View File

@ -48,10 +48,13 @@ I<<< ln -s /<path to file>/quota2percent_ quota2percent_sdb1 >>>
=head1 VERSION =head1 VERSION
17.0210 17.0213
=head1 HISTORY =head1 HISTORY
V17.0213
fix some slips
V17.0210 V17.0210
add env.humanid add env.humanid
@ -88,12 +91,12 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
if [ "$1" = "autoconf" ]; then if [ "$1" = "autoconf" ]; then
if ! repquota -V &> /dev/null ; then if ! repquota -V &> /dev/null ; then
echo "no ('requota' executable is missing)" echo "no ('requota' executable is missing)"
exit 127 exit 0
fi fi
if ! df "/dev/${0##*_}" &> /dev/null; then if ! df "/dev/${0##*_}" &> /dev/null; then
echo "no (device /dev/${0##*_} does not exist!)" >&2 echo "no (device /dev/${0##*_} does not exist!)"
exit 128 exit 0
fi fi
echo yes echo yes
@ -193,9 +196,7 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
Quota=( ${Quotas[$i]} ) Quota=( ${Quotas[$i]} )
UserName=${Quota[0]} UserName=${Quota[0]}
Passwd=$(grep "$UserName" /etc/passwd) Passwd=$(grep "$UserName" /etc/passwd)
OLDIFS=$IFS
IFS=':' Infos=($Passwd) IFS=':' Infos=($Passwd)
IFS=$OLDIFS
UserInfo=${Infos[4]} UserInfo=${Infos[4]}
UserInfo=${UserInfo%%,*} UserInfo=${UserInfo%%,*}