Commit e28ebb61 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) code cleanup rc.initial.banner

parent 8a7ba132
...@@ -52,39 +52,42 @@ foreach($iflist as $ifname => $friendly) { ...@@ -52,39 +52,42 @@ foreach($iflist as $ifname => $friendly) {
/* point to this interface's config */ /* point to this interface's config */
$ifconf = $config['interfaces'][$ifname]; $ifconf = $config['interfaces'][$ifname];
/* look for 'special cases' */ /* look for 'special cases' */
switch($ifconf['ipaddr']) { $class = "";
case "dhcp": if (isset($ifconf['ipaddr'])) {
$class = "/DHCP4"; switch($ifconf['ipaddr']) {
break; case "dhcp":
case "pppoe": $class = "/DHCP4";
$class = "/PPPoE"; break;
break; case "pppoe":
case "pptp": $class = "/PPPoE";
$class = "/PPTP"; break;
break; case "pptp":
case "l2tp": $class = "/PPTP";
$class = "/L2TP"; break;
break; case "l2tp":
default: $class = "/L2TP";
$class = ""; break;
break; }
} }
switch($ifconf['ipaddrv6']) { $class6 = null;
case "dhcp6": if (isset($ifconf['ipaddrv6'])) {
$class6 = "/DHCP6"; switch($ifconf['ipaddrv6']) {
break; case "dhcp6":
case "slaac": $class6 = "/DHCP6";
$class6 = "/SLAAC"; break;
break; case "slaac":
case "6rd": $class6 = "/SLAAC";
$class6 = "/6RD"; break;
break; case "6rd":
case "6to4": $class6 = "/6RD";
$class6 = "/6to4"; break;
break; case "6to4":
case "track6": $class6 = "/6to4";
$class6 = "/t6"; break;
break; case "track6":
$class6 = "/t6";
break;
}
} }
$ipaddr = get_interface_ip($ifname); $ipaddr = get_interface_ip($ifname);
$subnet = get_interface_subnet($ifname); $subnet = get_interface_subnet($ifname);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment