summaryrefslogtreecommitdiffstats
path: root/dns_wizard/scripts/Dnsconf.pm
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-12-09 17:24:23 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-12-09 17:24:23 +0000
commit8f5aea5c59228ff4e71ba8951313d59fbfd99723 (patch)
tree2e42ca12d617f961c424ec55e3eb15f16667f6ab /dns_wizard/scripts/Dnsconf.pm
parentcef4fffc8767d73ee93b8885a8615cbe5ef1b5d0 (diff)
downloaddrakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.gz
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.bz2
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.tar.xz
drakwizard-8f5aea5c59228ff4e71ba8951313d59fbfd99723.zip
No more use of drakconnect_conf, use of IFCFG.pm instead of DrakconnectConf.pm
Diffstat (limited to 'dns_wizard/scripts/Dnsconf.pm')
-rw-r--r--dns_wizard/scripts/Dnsconf.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/dns_wizard/scripts/Dnsconf.pm b/dns_wizard/scripts/Dnsconf.pm
index b03a6345..2c99cc1a 100644
--- a/dns_wizard/scripts/Dnsconf.pm
+++ b/dns_wizard/scripts/Dnsconf.pm
@@ -20,12 +20,12 @@
package Dnsconf;
require "__WIZ_HOME__/common/scripts/Vareqval.pm";
-require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
+require "__WIZ_HOME__/common/scripts/IFCFG.pm";
use MDK::Common;
use strict;
use standalone;
-my $o = DrakconnectConf->new();
+my $o = IFCFG->new();
my $dns1;
my $dns2;
@@ -67,7 +67,7 @@ sub get_dns2 {
sub up_serial {
my ($file) = @_;
-
+
my $serial_nbm = `date +%Y%m%d00` or die "date not found: $!";
output($file, map {
my $line = $_;
@@ -85,21 +85,21 @@ sub up_serial {
}
sub do_it {
- my $wiz_ip_server = $o->get_from_known_dev("IP");
- my $wiz_domain_name = $o->get("DomainName");
- my $wiz_host_name = $o->get("SystemName");
+ my $wiz_ip_server = $o->itf_get("IPADDR");
+ my $wiz_domain_name = $o->network_get("DOMAINNAME");
+ my $wiz_host_name = $o->network_get("HOSTNAME");
my $s_trunc = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $ds = "$4" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $host = "$1" if $wiz_host_name =~ /(.*?)\..*/;
my $reversnet = "$3$2$1" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $file = "/etc/host.conf";
-
+
MDK::Common::cp_af($file, $file.".orig");
MDK::Common::cp_af("__WIZ_HOME__/dns_wizard/scripts/host.conf.default", $file);
-
+
$file = "/etc/named.conf";
-f $file and MDK::Common::cp_af($file, $file.".orig");
-
+
my $ispns1 = $ENV{wiz_ext_dns1} || "// __ISPN1__";
my $ispns2 = $ENV{wiz_ext_dns2} || "// __ISPN2__";
@@ -130,7 +130,7 @@ sub do_it {
} cat_("__WIZ_HOME__/dns_wizard/scripts/127.0.0.rev.default"));
standalone::explanations("$file : hostname: $wiz_host_name");
up_serial($file);
-
+
# $ipnet.rev
$file = "/var/named/$s_trunc.rev";
-f $file and MDK::Common::cp_af($file, $file.".orig");