summaryrefslogtreecommitdiffstats
path: root/dns_wizard
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-02-05 15:13:23 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-02-05 15:13:23 +0000
commit816875ca1bd01078fcd617468775a2093781629d (patch)
treee94ca98e53c61e706dec4b89422a6687fe27aed4 /dns_wizard
parent334fd1a7c7f9d88f37112782b8069e979e34518a (diff)
downloaddrakwizard-816875ca1bd01078fcd617468775a2093781629d.tar
drakwizard-816875ca1bd01078fcd617468775a2093781629d.tar.gz
drakwizard-816875ca1bd01078fcd617468775a2093781629d.tar.bz2
drakwizard-816875ca1bd01078fcd617468775a2093781629d.tar.xz
drakwizard-816875ca1bd01078fcd617468775a2093781629d.zip
use IPADDR or result of ip sh dev eth0
Diffstat (limited to 'dns_wizard')
-rw-r--r--dns_wizard/Bind.pm6
1 files changed, 4 insertions, 2 deletions
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`);