Menu="NetworkSettings" Title="Interface Rules" Tag="icon-network" Cond="file_exists('/boot/config/network-rules.cfg')" --- $cfg = '/boot/config/network-rules.cfg'; function strip($item) { [$key, $val] = explode('"', $item); return $val; } exec("awk '/^SUBSYSTEM==/ {print $4 $8}' $cfg", $rules); exec("grep -Po '^# \K.*' $cfg", $info); $link = []; $i = 0; foreach ($rules as $rule) { [$mac, $eth] = array_map('strip', my_explode(',', $rule)); if (str_starts_with($eth, 'eth')) { $link[$eth]['mac'] = $mac; $link[$eth]['info'] = $info[$i]; } $i++; } ksort($link, SORT_NATURAL); ?>
:eth_network_rules_help: