Ajout d'un "patch" pour quand on a pas activé les quota sur le disque.

This commit is contained in:
Alan Garcia 2011-03-06 21:05:44 +00:00
parent db0dc564e7
commit e0c1792d14
1 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,7 @@ fi
# quota will split its display on two lines if QUOTA_PART is bigger than 15
# characters. *sigh*
PART_LEN=`echo -n "$QUOTA_PART" | $WC -c`
val=$(
if [ "$PART_LEN" -gt 15 ]; then
$QUOTA -g "$1" |
$SED -n -e "\\;${QUOTA_PART};,+1s/ *\([0-9]*\) .*/\1/p" |
@ -33,4 +34,13 @@ else
$QUOTA -g "$1" | $AWK /${QUOTA_PART//\//\\\/}/\ {print\ '$2'}
$QUOTA -g "$1" | $AWK /${QUOTA_PART//\//\\\/}/\ {print\ '$3'}
fi
)
# If the quota aren't activated, I return something anyway
if [ -z "$val" ] ; then
echo 0
echo 0
else
echo -e "$val"
fi