This commit is contained in:
poslop
2025-12-22 15:35:34 -06:00
parent 5329f036f9
commit f21f4c2bbf
2 changed files with 11 additions and 3 deletions

1
extensions.ini Normal file
View File

@@ -0,0 +1 @@
extensions = 334,338

View File

@@ -22,10 +22,10 @@ function main(): void {
$argv = $_SERVER['argv'] ?? []; $argv = $_SERVER['argv'] ?? [];
$do_notify = in_array('--notify', $argv, true); $do_notify = in_array('--notify', $argv, true);
$pbdb = pull_db();
$pbdb = trim_db($pbdb);
$ext_list = ['338', '334']; $pbdb = trim_db(pull_db());
$ext_list = read_extension_ini();
$mac_list = pull_mac_list(); $mac_list = pull_mac_list();
foreach ($ext_list as $ext) { foreach ($ext_list as $ext) {
@@ -142,6 +142,13 @@ function pull_mac_list(): array {
return array_column($mac_db, 'mac', 'ext'); return array_column($mac_db, 'mac', 'ext');
} }
function read_extension_ini(): array {
$extensions = parse_ini_file('extensions.ini');
$ext_list = array_map('intval', explode(',', $extensions['extensions']));
return $ext_list;
}
function pull_xml_file($file): DOMDocument { function pull_xml_file($file): DOMDocument {
if (!file_exists($file)) { if (!file_exists($file)) {
$file = '/tftpboot/000000000000-features.cfg'; $file = '/tftpboot/000000000000-features.cfg';