From 816875ca1bd01078fcd617468775a2093781629d Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Thu, 5 Feb 2004 15:13:23 +0000 Subject: use IPADDR or result of ip sh dev eth0 --- dns_wizard/Bind.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dns_wizard') diff --git a/dns_wizard/Bind.pm b/dns_wizard/Bind.pm index 3dc5a6a7..d99fc8bd 100644 --- a/dns_wizard/Bind.pm +++ b/dns_wizard/Bind.pm @@ -37,9 +37,11 @@ my $wiz = new MDK::Wizard::Wizcommon; my $SERIAL = `date +%d%m20%y`; my $HOSTNAME = $wiz->{net}->network_get("HOSTNAME"); -#my $IPSERVER = $wiz->{net}->itf_get("IPADDR"); my $interface = 'eth0'; -my ($IPSERVER) = `/sbin/ip addr show dev $interface` =~ /^\s*inet\s+(\d+\.\d+\.\d+\.\d+)/m; +my $IPSERVER = $wiz->{net}->itf_get("IPADDR"); +if (!$IPSERVER) { + ($IPSERVER) = `/sbin/ip addr show dev $interface` =~ /^\s*inet\s+(\d+\.\d+\.\d+\.\d+)/m; +} #my $DOMAINNAME = $wiz->{net}->network_get("DOMAINNAME"); my $DOMAINNAME = chomp_(`dnsdomainname`); -- cgit v1.2.1