@jimp
if you want to pass it along...
the better fix is to pass available_kernel_memory in the post data to keep up with the MVC refactoring that it is going on.
I added an hidden input field in the form in /usr/local/www/systrm_advanced_misc.php at the end of the RAM disk section as follow:
$group->add(new Form_Input(
'use_mfs_tmp_size',
'/tmp RAM Disk Size',
'number',
$pconfig['use_mfs_tmp_size'],
['placeholder' => 40]
))->setHelp('/tmp RAM Disk<br />Do not set lower than 40.');
$group->add(new Form_Input(
'use_mfs_var_size',
'/var RAM Disk Size',
'number',
$pconfig['use_mfs_var_size'],
['placeholder' => 60]
))->setHelp('/var RAM Disk<br />Do not set lower than 60.');
$group->setHelp('Sets the size, in MiB, for the RAM disks. ' .
'Ensure each RAM disk is large enough to contain the current contents of the directories in question. %s' .
'Maximum total size of all RAM disks cannot exceed available kernel memory: %s',
'<br/>', format_bytes( $pconfig['available_kernel_memory'] ));
// new hidden input field to pass available kernel memory in POST data
$group->add(new Form_Input(
'available_kernel_memory',
'Available Kernel Memory',
'hidden',
$pconfig['available_kernel_memory']));
$section->add($group);
no changes required to the save data function in etc/inc/web/system_advanced_misc.inc