From 8f5aea5c59228ff4e71ba8951313d59fbfd99723 Mon Sep 17 00:00:00 2001 From: Arnaud Desmons Date: Mon, 9 Dec 2002 17:24:23 +0000 Subject: No more use of drakconnect_conf, use of IFCFG.pm instead of DrakconnectConf.pm --- dns_wizard/scripts/Dnsconf.pm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'dns_wizard/scripts/Dnsconf.pm') 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"); -- cgit v1.2.1