summaryrefslogtreecommitdiffstats
path: root/dns_wizard
diff options
context:
space:
mode:
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`);