Network rules: fix double quote display

This commit is contained in:
bergware
2025-07-29 09:48:05 +02:00
parent 374cce983d
commit bc3700f4b2

View File

@@ -19,7 +19,7 @@ Cond="file_exists('/boot/config/network-rules.cfg')"
$cfg = '/boot/config/network-rules.cfg';
function strip($item) {
[$key, $val] = my_explode('"', $item);
[$key, $val] = explode('"', $item);
return $val;
}
@@ -28,7 +28,7 @@ exec("grep -Po '^# \K.*' $cfg", $info);
$link = []; $i = 0;
foreach ($rules as $rule) {
[$mac, $eth] = array_map('strip', explode(',', $rule));
[$mac, $eth] = array_map('strip', my_explode(',', $rule));
if (str_starts_with($eth, 'eth')) {
$link[$eth]['mac'] = $mac;
$link[$eth]['info'] = $info[$i];