" oninput="noRun(this.form)">
:eth_interface_description_help:
@@ -781,7 +781,7 @@ _(IPv6 privacy extensions)_:
_(Interface description)_:
:
-
" onchange="exitCode(this.form,true)">
+
" oninput="noRun(this.form)">
_(VLAN number)_:
diff --git a/plugins/dynamix/scripts/diagnostics b/plugins/dynamix/scripts/diagnostics
index 27024336b..549e0fb89 100755
--- a/plugins/dynamix/scripts/diagnostics
+++ b/plugins/dynamix/scripts/diagnostics
@@ -577,6 +577,7 @@ foreach (glob("/var/log/syslog*") as $file) {
run("sed -ri 's|\b\S+@\S+\.\S+\b|email@removed.com|;s|\b(username\|password)([=:])\S+\b|\\1\\2xxx|;s|(GUID: \S)\S+(\S) |\\1..\\2 |;s|(moving \"\S\|\"/mnt/user/\S).*(\S)\"|\\1..\\2\"|' ".escapeshellarg("$log.txt"));
run("sed -ri 's|(server: ).+(\.(my)?unraid\.net(:[0-9]+)?,)|\\1hash\\2|;s|(host: \").+(\.(my)?unraid\.net(:[0-9]+)?\")|\\1hash\\2|;s|(referrer: \"https?://).+(\.(my)?unraid\.net)|\\1hash\\2|' ".escapeshellarg("$log.txt"));
foreach ($titles as $mover) {
+ if (!$mover) continue;
$title = "/{$mover[0]}..".substr($mover,-1)."/...";
run("sed -i 's/".str_replace("/","\/",$mover)."/".str_replace("/","\/",$title)."/g' ".escapeshellarg("$log.txt")." 2>/dev/null");
//run("sed -ri 's|(file: [.>cr].*)[ /]$mover/.*$|\\1 file: $title|' ".escapeshellarg("$log.txt")." 2>/dev/null");
diff --git a/plugins/dynamix/scripts/netconfig b/plugins/dynamix/scripts/netconfig
index 12c68ff15..8b88a1a6d 100755
--- a/plugins/dynamix/scripts/netconfig
+++ b/plugins/dynamix/scripts/netconfig
@@ -21,7 +21,7 @@ function ifname($name) {
global $old;
if (!$name) return;
for ($i=0; $i<$old['SYSNICS']; $i++) {
- $nics = $old['BONDNICS'][$i] ?: $old['BRNICS'][$i];
+ $nics = $old['BONDNICS'][$i] ?? $old['BRNICS'][$i] ?? '';
if (strpos("$nics ","$name ")!==false) return $old['IFNAME'][$i];
}
return $name;
@@ -40,13 +40,13 @@ function bridge_nics(&$bridge,$nic) {
if ($run) {
$old = [];
if (file_exists($cfg)) {
- $old = parse_ini_string(preg_replace('/^#/m',';',file_get_contents($cfg)));
+ $old = parse_ini_string(preg_replace(['/^#/m',"/\r/m"],[';',''],file_get_contents($cfg)));
if (isset($old['SYSNICS'])) {
// new syntax
$ifname = ifname($set);
} else {
// legacy syntax
- if ($set=='eth0') $ifname = $old['BRIDGING']=='yes' ? ($old['BRNAME'] ?: 'br0') : ($old['BONDING']=='yes' ? ($old['BONDNAME'] ?: 'bond0') : $set);
+ if ($set=='eth0') $ifname = $old['BRIDGING']=='yes' ? ($old['BRNAME'] ?? 'br0') : ($old['BONDING']=='yes' ? ($old['BONDNAME'] ?? 'bond0') : $set);
}
}
exec("/etc/rc.d/rc.inet1 ".escapeshellarg("{$ifname}_stop")." >/dev/null");
@@ -95,8 +95,8 @@ foreach ($ini as $name => $port) {
if ($item=='USE_DHCP6') $USE_DHCP6 = $val;
if (in_array($item,['IPADDR','NETMASK','GATEWAY']) && $USE_DHCP!='no') continue;
if (in_array($item,['IPADDR6','NETMASK6','GATEWAY6']) && $USE_DHCP6!='no') continue;
- if (preg_match('/^DNS_SERVER/',$key) && (empty($DHCP_KEEPRESOLV) || $DHCP_KEEPRESOLV=='no')) continue;
- if (preg_match('/^DNS6_SERVER/',$key) && (empty($DHCP6_KEEPRESOLV) || $DHCP6_KEEPRESOLV=='no')) continue;
+ if (preg_match('/^DNS_SERVER/',$key) && isset($DHCP_KEEPRESOLV) && $DHCP_KEEPRESOLV=='no') continue;
+ if (preg_match('/^DNS6_SERVER/',$key) && isset($DHCP6_KEEPRESOLV) && $DHCP6_KEEPRESOLV=='no') continue;
if ($item=='PRIVACY6' && $PROTOCOL=='ipv4') continue;
if ($item=='METRIC' && $PROTOCOL=='ipv6') continue;
if ($item=='METRIC6' && $PROTOCOL=='ipv4') continue;