Add system modprobe.d files

This commit is contained in:
SimonFair
2023-07-28 21:33:54 +01:00
parent d2ee1c1daf
commit 64ea160d32
2 changed files with 21 additions and 3 deletions

View File

@@ -57,8 +57,17 @@ switch ($_POST['table']) {
if($state !== false) {$state = "Disabled" ;} else $state="Custom" ;
$module['state'] = $state ;
$module['modprobe'] = $modprobe ;
}
} else {
if (is_file("/etc/modprobe.d/$modname.conf")) {
$modprobe = file_get_contents("/etc/modprobe.d/$modname.conf") ;
$state = strpos($modprobe, "blacklist");
$modprobe = explode(PHP_EOL,$modprobe) ;
if($state !== false) {$state = "Disabled" ;} else $state="System" ;
$module['state'] = $state ;
$module['modprobe'] = $modprobe ;
}
}
$html .= "<tr id='row$modname'>" ;
if ($supportpage) {
if ($module['support'] == false) {

View File

@@ -77,7 +77,16 @@ if (is_file("/boot/config/modprobe.d/$modname.conf")) {
$modprobe = explode(PHP_EOL,$modprobe) ;
if($state !== false) {$state = "Disabled" ;}
else $state="Custom" ;
}
} else {
if (is_file("/etc/modprobe.d/$modname.conf")) {
$modprobe = file_get_contents("/etc/modprobe.d/$modname.conf") ;
$state = strpos($modprobe, "blacklist");
$modprobe = explode(PHP_EOL,$modprobe) ;
if($state !== false) {$state = "Disabled" ;} else $state="System" ;
$module['state'] = $state ;
$module['modprobe'] = $modprobe ;
}
}
if ($filename != "(builtin)") {
if ($filename != null) {