From 175a62d425d2eca02a31b6cde8d8e66ea7434f9c Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 28 Jun 2011 12:28:23 -0400 Subject: [PATCH] No-address fixes --- net/lang/en | 1 + net/list_ifcs.cgi | 5 +++-- net/redhat-linux-lib.pl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/net/lang/en b/net/lang/en index cd4a4680e..5a6ec1489 100644 --- a/net/lang/en +++ b/net/lang/en @@ -44,6 +44,7 @@ ifcs_range=Range $1 ifcs_static2=Static configuration ifcs_static3=IPv6 enabled ifcs_noaddress=No address configured +ifcs_nonetmask=None ifcs_mode=IPv4 address ifcs_mode6=IPv6 addresses ifcs_address6=IPv6 address diff --git a/net/list_ifcs.cgi b/net/list_ifcs.cgi index e77e47581..0281c5bce 100755 --- a/net/list_ifcs.cgi +++ b/net/list_ifcs.cgi @@ -209,8 +209,9 @@ foreach $a (@boot) { $a->{'dhcp'} ? $text{'ifcs_dhcp'} : $a->{'address'} ? &html_escape($a->{'address'}) : $text{'ifcs_noaddress'}); - push(@cols, $a->{'netmask'} ? &html_escape($a->{'netmask'}) - : $text{'ifcs_auto'}); + push(@cols, $a->{'netmask'} ? &html_escape($a->{'netmask'}) : + !$a->{'address'} ? $text{'ifcs_nonetmask'} : + $text{'ifcs_auto'}); if (&supports_address6()) { push(@cols, $a->{'auto6'} ? $text{'ifcs_auto6'} : join("
\n", map { &html_escape($_) } diff --git a/net/redhat-linux-lib.pl b/net/redhat-linux-lib.pl index 00cbe06a7..764fb7ca2 100755 --- a/net/redhat-linux-lib.pl +++ b/net/redhat-linux-lib.pl @@ -117,7 +117,7 @@ while($f = readdir(CONF)) { $b->{'address6'} = [ map { $_->[0] } @ip6s ]; $b->{'netmask6'} = [ map { $_->[1] } @ip6s ]; } - elsif ($conf{'IPV6INIT'}) { + elsif (lc($conf{'IPV6INIT'}) eq 'yes') { $b->{'auto6'} = 1; } $b->{'edit'} = ($b->{'name'} !~ /^ppp|irlan/);