You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PFSense 24.11 removes the PHP smart code. This is a copied code snip from 23.09 util.php i believe, i have manually added it to my file but this will require some sort of fix for the new versions.
This code below is a terrible workaround that checks for a duplicate function if used on 23.09 and seems to work on my 24.11, sorry my ability is limited.
/* Locate disks that can be queried for S.M.A.R.T. data. */if (!function_exists('get_smart_drive_list')) {
functionget_smart_drive_list() {
/* SMART supports some disks directly, and some controllers directly, * See https://redmine.pfsense.org/issues/9042 */$supported_disk_types = array("ad", "da", "ada");
$supported_controller_types = array("nvme");
$disk_list = explode("", get_single_sysctl("kern.disks"));
foreach ($disk_listas$id => $disk) {
// We only want certain kinds of disks for S.M.A.R.T.// 1 is a match, 0 is no match, False is any problem processing the regexif (preg_match("/^(" . implode("|", $supported_disk_types) . ").*[0-9]{1,2}$/", $disk) !== 1) {
unset($disk_list[$id]);
continue;
}
}
foreach ($supported_controller_typesas$controller) {
$devices = glob("/dev/{$controller}*");
if (!is_array($devices)) {
continue;
}
foreach ($devicesas$device) {
$disk_list[] = basename($device);
}
}
sort($disk_list);
return$disk_list;
}
}
The text was updated successfully, but these errors were encountered:
Hello,
PFSense 24.11 removes the PHP smart code. This is a copied code snip from 23.09 util.php i believe, i have manually added it to my file but this will require some sort of fix for the new versions.
This code below is a terrible workaround that checks for a duplicate function if used on 23.09 and seems to work on my 24.11, sorry my ability is limited.
The text was updated successfully, but these errors were encountered: