Browse Source

Changed the quota check to also set quota when the quota are very

small. This allows for setting small default quota.
pull/24/head
F. Dijkstra 5 months ago
parent
commit
4cfa01b162
  1. 4
      roles/ldap/files/login_checks.sh

4
roles/ldap/files/login_checks.sh

@ -129,10 +129,12 @@ set_quota () { @@ -129,10 +129,12 @@ set_quota () {
exit -1
fi
# Add the quota for user and group, to check if either is set
# Quota user must be 0 for all users in the current situation.
quota=$(($quota_user + $quota_group))
# regexp for checking if quota are a number
echo Quota: $quota
if [ $quota -eq "0" ]; then
# If quota are not set or a small value (default quota) they must be set
if [ $quota -le "4096" ]; then
echo "Setting quota for $5"
$LFS setquota -g $GROUP --block-softlimit $1 --block-hardlimit $2 --inode-softlimit $3 --inode-hardlimit $4 $5
if [ $? -ne 0 ]; then

Loading…
Cancel
Save