Also look at /etc/mtab to check if quotas are on
authorJamie Cameron <jcameron@webmin.com>
Sat, 8 Dec 2007 06:46:28 +0000 (06:46 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 8 Dec 2007 06:46:28 +0000 (06:46 +0000)
quota/CHANGELOG
quota/linux-lib.pl

index 00f3a4b..4f075ed 100644 (file)
@@ -28,3 +28,5 @@ On Linux systems with the setquota command, it is called instead of edquota to c
 Added a Module Config option to sort user lists by the percentage of soft quota used.
 ---- Changes since 1.350 ----
 Added a Module Config option to show both hard and/or soft quota percentages.
+---- Changes since 1.380 ----
+Quotas are considered active for a filesystem if the usrquota or grpquota options are on in /etc/mtab, even if missing from /etc/fstab.
index 75608ef..8c7c1e5 100644 (file)
@@ -54,8 +54,10 @@ return @rv;
 #  3 = User and group quotas
 sub quota_can
 {
-return ($_[1]->[3] =~ /usrquota/ ? 1 : 0) +
-       ($_[1]->[3] =~ /grpquota/ ? 2 : 0);
+return ($_[1]->[3] =~ /usrquota/ ||
+       $_[0]->[3] =~ /usrquota/ ? 1 : 0) +
+       ($_[1]->[3] =~ /grpquota/ ||
+        $_[0]->[3] =~ /usrquota/ ? 2 : 0);
 }
 
 # quota_now(&mnttab, &fstab)