Skip to content

Commit

Permalink
Fix to enable quotas using grubby command
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Nov 20, 2023
1 parent 73799bf commit 5078805
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/Virtualmin/Config/Plugin/Quotas.pm
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,17 @@ sub actions {
my $prt_std_err = 1;
if ($xfs) {

# Update the grub config file source
my $grubby_cmd = &has_command('grubby');
my $grub_def_file = "/etc/default/grub";
if (-r $grub_def_file) {

# Use grubby command to enable user and group quotas
if (-x $grubby_cmd) {
$self->logsystem(
"$grubby_cmd --update-kernel=ALL --args=rootflags=uquota,gquota"
);
}
# Update configuration manually
elsif (-r $grub_def_file) {
my %grub;
&read_env_file($grub_def_file, \%grub) || ($res = 0);
my $v = $grub{'GRUB_CMDLINE_LINUX'};
Expand Down

0 comments on commit 5078805

Please sign in to comment.