mirror of
https://github.com/unraid/webgui.git
synced 2026-01-13 13:09:58 -06:00
Improved 'interface not configured' detection
This commit is contained in:
@@ -16,7 +16,7 @@ Png="ethernet.png"
|
||||
?>
|
||||
<?
|
||||
// get interface configuration state
|
||||
$down = strlen(exec("ip link show ethX|grep -om1 ',UP[,>]'"))==0;
|
||||
$down = empty($ethX) || strlen(exec("ip link show ethX|grep -om1 ',UP[,>]'"))==0;
|
||||
|
||||
// get VLAN interfaces
|
||||
$vlan_ethX = [0];
|
||||
|
||||
@@ -11,5 +11,15 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
if ($_POST['#arg'][1] != 'none') unset($keys[$_POST['#section']]); // do nothing when only description has changed
|
||||
if ($_POST['#arg'][1] != 'none') {
|
||||
if ($_POST['BONDING']=='yes') {
|
||||
$nics = explode(',',str_replace('eth0','',$_POST['BONDNICS']));
|
||||
foreach ($nics as $nic) if ($nic) unset($keys[$nic]);
|
||||
}
|
||||
if ($_POST['BRIDGING']=='yes') {
|
||||
$nics = explode(',',str_replace('eth0','',$_POST['BRNICS']));
|
||||
foreach ($nics as $nic) if ($nic) unset($keys[$nic]);
|
||||
}
|
||||
unset($keys[$_POST['#section']]);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user