From a438eb98ff344dcbd8451132c3a431db2c3f6c88 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 29 Oct 2005 16:51:23 +0000 Subject: Resolve interface ip's in the console instead of showing DHCP Ticket #652 --- etc/rc.banner | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/rc.banner b/etc/rc.banner index f987665..7c1bd78 100755 --- a/etc/rc.banner +++ b/etc/rc.banner @@ -41,15 +41,22 @@ $buildtime = chop(file_get_contents("{$g['etc_path']}/version.buildtime")); $platform = chop(file_get_contents("{$g['etc_path']}/platform")); + $lanip = find_interface_ip($config['interfaces']['lan']['if']); + $wanip = find_interface_ip($config['interfaces']['wan']['if']); + echo << {$config['interfaces']['lan']['if']} -> {$config['interfaces']['lan']['ipaddr']} - WAN -> {$config['interfaces']['wan']['if']} -> {$config['interfaces']['wan']['ipaddr']} + LAN -> {$config['interfaces']['lan']['if']} -> {$lanip} + WAN -> {$config['interfaces']['wan']['if']} -> {$wanip} EOD; - for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) - echo "\n OPT{$i} -> {$config['interfaces']['opt' . $i]['if']} -> " . $config['interfaces']['opt' . $i]['ipaddr'] . - "({$config['interfaces']['opt' . $i]['descr']})"; + for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { + $ipaddr = find_interface_ip($config['interfaces']['opt' . $i]['if']); + echo "\n OPT{$i} -> {$config['interfaces']['opt' . $i]['if']} -> "; + echo $ipaddr; + echo " ({$config['interfaces']['opt' . $i]['descr']})"; + } + ?> \ No newline at end of file -- cgit v1.1