Ajout d'un "patch" pour quand on a pas activé les quota sur le disque.
This commit is contained in:
parent
db0dc564e7
commit
e0c1792d14
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue