quotaon doesn't work over nfs. changing the call to use quota command

This commit is contained in:
Steven Mondji-Lerider 2013-02-25 14:11:24 +00:00
parent 306e1797ca
commit 90a638693e
1 changed files with 4 additions and 3 deletions

View File

@ -192,7 +192,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 13 ]; do
ALTERNC_HTML="$RET"
#checking acl and quota activation.
MOUNT_POINT=$(df -P ${ALERNC_HTML%/*} | tail -n 1 | awk '{print $6}')
MOUNT_POINT=$(df -P ${ALTERNC_HTML%/*} | tail -n 1 | awk '{print $6}')
aclcheckfile="$ALTERNC_HTML/test-acl"
touch "$aclcheckfile"
setfacl -m u:root:rwx "$aclcheckfile" 2>/dev/null || ( echo "Error : ACL aren't activated on $ALTERNC_HTML AlternC can't work without it." ; exit 2)
@ -205,9 +205,10 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 13 ]; do
exit 2
fi
quota_activation=$(quotaon -pa 2>/dev/null |grep '^group.*on$' | awk '$4 ~ /^\'$MOUNT_POINT'$/ {print $4}')
quota_activation=$(quota -gA -f $MOUNT_POINT >/dev/null)
if [ -z "$quota_activation" -o "$quota_activation" != "$MOUNT_POINT" ]; then
if [ $? -ne 0 ]; then
db_get alternc/quotauninstalled
if [ -z "$RET" ]; then
db_input critical alternc/quotauninstalled || true