POD fixes
authorJamie Cameron <jcameron@webmin.com>
Sun, 11 Jan 2009 21:16:52 +0000 (21:16 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 11 Jan 2009 21:16:52 +0000 (21:16 +0000)
quota/linux-lib.pl
quota/quota-lib.pl

index 617d029..5a21e0c 100644 (file)
@@ -67,10 +67,14 @@ return @rv;
 
 Can this filesystem type support quotas? Takes array refs from mounted and
 mountable filesystems, and returns one of the following :
-0 = No quota support (or not turned on in /etc/fstab)
-1 = User quotas only
-2 = Group quotas only
-3 = User and group quotas
+
+=item 0 - No quota support (or not turned on in /etc/fstab).
+
+=item 1 - User quotas only.
+
+=item 2 - Group quotas only.
+
+=item 3 - User and group quotas.
 
 =cut
 sub quota_can
@@ -85,10 +89,12 @@ return ($_[1]->[3] =~ /usrquota|usrjquota/ ||
 
 Are quotas currently active? Takes array refs from mounted and mountable
 filesystems, and returns one of the following :
-0 = Not active
-1 = User quotas active
-2 = Group quotas active
-3 = Both active
+
+=item 0 - Not active.
+=item 1 - User quotas active.
+=item 2 - Group quotas active.
+=item 3 - Both active.
+
 Adding 4 means they cannot be turned off (such as for XFS)
 
 =cut
@@ -182,9 +188,12 @@ return $supports_status_cache{$_[0],$_[1]};
 
 Activate quotas and create quota files for some filesystem. The mode can
 be one of :
-1 - User only
-2 - Group only
-3 - User and group
+
+=item 1 - User only.
+
+=item 2 - Group only.
+
+=item 3 - User and group.
 
 =cut
 sub quotaon
@@ -263,7 +272,7 @@ return undef;
 =head2 run_quotacheck(filesys, args)
 
 Runs the quotacheck command on some filesytem, and returns 1 on success or
-0 on failure.
+0 on failure. Mainly for internal use when enabling quotas.
 
 =cut
 sub run_quotacheck
@@ -522,9 +531,12 @@ return $rv;
 
 Runs quotacheck on some filesystem, and returns the output in case of error,
 or undef on failure. The mode must be one of :
-0 - Users and groups
-1 - Users only
-2 - Groups only
+
+=item 0 - Users and groups.
+
+=item 1 - Users only.
+
+=item 2 - Groups only.
 
 =cut
 sub quotacheck
@@ -585,10 +597,14 @@ return undef;
 Returns an array containing information about grace times on some filesystem,
 which is the amount of time a user can exceed his soft quota before it becomes
 hard. The elements of the array are :
-Grace time for block quota, in units below.
-Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
-Grace time for files quota, in units below.
-Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for block quota, in units below.
+
+=item Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for files quota, in units below.
+
+=item Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
 
 =cut
 sub get_user_grace
@@ -601,10 +617,14 @@ return &parse_grace_output($config{'user_grace_command'}, $_[0]);
 Returns an array containing information about grace times on some filesystem,
 which is the amount of time a group can exceed its soft quota before it becomes
 hard. The elements of the array are :
-Grace time for block quota, in units below.
-Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
-Grace time for files quota, in units below.
-Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for block quota, in units below.
+
+=item Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for files quota, in units below.
+
+=item Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
 
 =cut
 sub get_group_grace
index 3669d4b..bd8806b 100755 (executable)
@@ -41,18 +41,28 @@ $email_cmd = "$module_config_directory/email.pl";
 
 Returns a list of details of local filesystems on which quotas are supported.
 Each is an array ref whose values are :
-directory - Mount point, like /home
-device - Source device, like /dev/hda1
-type - Filesystem type, like ext3
-options - Mount options, like rw,usrquota,grpquota
-quotacan - Can this filesystem type support quotas?
-quotanow - Are quotas enabled right now?
+
+=item directory - Mount point, like /home
+
+=item device - Source device, like /dev/hda1
+
+=item type - Filesystem type, like ext3
+
+=item options - Mount options, like rw,usrquota,grpquota
+
+=item quotacan - Can this filesystem type support quotas?
+
+=item quotanow - Are quotas enabled right now?
 
 The values of quotacan and quotanow are :
-0 - No quotas
-1 - User quotas only
-2 - Group quotas only
-3 - User and group quotas
+
+=item 0 - No quotas
+
+=item 1 - User quotas only
+
+=item 2 - Group quotas only
+
+=item 3 - User and group quotas
 
 =cut
 sub list_filesystems
@@ -86,9 +96,21 @@ if ($_[0] ne "-") {
 
 =head2 user_quota(user, filesystem)
 
-Returns an array of  ublocks, sblocks, hblocks, ufiles, sfiles, hfiles
-for some user on some filesystem, or an empty array if no quota has been
-assigned.
+Returns an array of quotas and usage information for some user on some
+filesystem, or an empty array if no quota has been assigned. The array
+elements are :
+
+=item Number of blocks used.
+
+=item Soft block quota.
+
+=item Hard block quota.
+
+=item Number of files used.
+
+=item Soft file quota.
+
+=item Hard file quota.
 
 =cut
 sub user_quota
@@ -129,12 +151,18 @@ return ();
 =head2 edit_user_quota(user, filesys, sblocks, hblocks, sfiles, hfiles)
 
 Sets the disk quota for some user. The parameters are :
-user - Unix username
-filesys - Filesystem on which to change quotas
-sblocks - Soft block limit
-hblocks - Hard block limit
-sfiles - Sort files limit
-hfiles - Hard files limit
+
+=item user - Unix username.
+
+=item filesys - Filesystem on which to change quotas.
+
+=item sblocks - Soft block limit.
+
+=item hblocks - Hard block limit.
+
+=item sfiles - Sort files limit.
+
+=item hfiles - Hard files limit.
 
 =cut
 sub edit_user_quota
@@ -181,12 +209,18 @@ else {
 =head2 edit_group_quota(group, filesys, sblocks, hblocks, sfiles, hfiles)
 
 Sets the disk quota for some group The parameters are :
-user - Unix group name
-filesys - Filesystem on which to change quotas
-sblocks - Soft block limit
-hblocks - Hard block limit
-sfiles - Sort files limit
-hfiles - Hard files limit
+
+=item user - Unix group name.
+
+=item filesys - Filesystem on which to change quotas.
+
+=item sblocks - Soft block limit.
+
+=item hblocks - Hard block limit.
+
+=item sfiles - Sort files limit.
+
+=item hfiles - Hard files limit.
 
 =cut
 sub edit_group_quota
@@ -233,15 +267,16 @@ else {
 =head2 edit_user_grace(filesystem, btime, bunits, ftime, funits)
 
 Change the grace times for blocks and files on some filesystem. Parameters are:
-filesystem - Filesystem to change the grace time on
-btime - Number of units after which a user over his soft block limit is turned
-       into a hard limit.
-bunits - Units for the block grace time, such as 'seconds', 'minutes',
-        'hours' or 'days'
-ftime - Number of units after which a user over his soft file limit is turned
-        into a hard limit.
-funits - Units for the file grace time, such as 'seconds', 'minutes',
-        'hours' or 'days'
+
+=item filesystem - Filesystem to change the grace time on.
+
+=item btime - Number of units after which a user over his soft block limit is turned into a hard limit.
+
+=item bunits - Units for the block grace time, such as 'seconds', 'minutes', 'hours' or 'days'.
+
+=item ftime - Number of units after which a user over his soft file limit is turned into a hard limit.
+
+=item funits - Units for the file grace time, such as 'seconds', 'minutes', 'hours' or 'days'.
 
 =cut
 sub edit_user_grace