mirror of
https://github.com/webmin/webmin.git
synced 2026-08-25 00:00:31 +01:00
Add Btrfs subvolume quota support to the Disk Quotas module, including full and simple accounting modes, quota lifecycle actions, and qgroup usage and limit management. Includes ACL enforcement, compatibility with older btrfs-progs versions, destructive-action confirmation, top-level qgroup protection, help, and tests.
24 lines
660 B
Perl
Executable File
24 lines
660 B
Perl
Executable File
# install_check.pl
|
|
|
|
do 'quota-lib.pl';
|
|
|
|
# is_installed(mode)
|
|
# For mode 1, returns 2 if the server is installed and configured for use by
|
|
# Webmin, 1 if installed but not configured, or 0 otherwise.
|
|
# For mode 0, returns 1 if installed, 0 if not
|
|
sub is_installed
|
|
{
|
|
# Check the traditional quota-tools dependency when this OS implements it.
|
|
if (defined("as_init)) {
|
|
local $err = "as_init();
|
|
# A usable Btrfs mount and command provide an alternative when the
|
|
# traditional quota-tools package is not installed.
|
|
if ($err) {
|
|
local @btrfs = &list_btrfs_filesystems();
|
|
return 0 if (!@btrfs || !&has_command("btrfs"));
|
|
}
|
|
}
|
|
return $_[0] ? 2 : 1;
|
|
}
|
|
|