Skip to content

Instantly share code, notes, and snippets.

@ljm42
Last active January 22, 2023 04:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljm42/cc8bce83129cecbe148c09f0fbf6d3da to your computer and use it in GitHub Desktop.
Save ljm42/cc8bce83129cecbe148c09f0fbf6d3da to your computer and use it in GitHub Desktop.
<?php
$ethX='eth0';
extract(parse_ini_file('state/network.ini',true));
$dev = $$ethX['BRIDGING']=='yes' ? $$ethX['BRNAME'] : ($$ethX['BONDING']=='yes' ? $$ethX['BONDNAME'] : $ethX);
print_r($$ethX);
print "BRIDGING: '{$$ethX['BRIDGING']}'\n";
print "BRNAME: '{$$ethX['BRNAME']}'\n";
print "BONDING: '{$$ethX['BONDING']}'\n";
print "BONDNAME: '{$$ethX['BONDNAME']}'\n";
print "ethX: '{$ethX}'\n";
print "device: '{$dev}'\n";
if (empty($dev)) print "HEY dev is empty!\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment