summaryrefslogtreecommitdiffstats
path: root/dns_wizard
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-08-26 08:47:21 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-08-26 08:47:21 +0000
commit581d26118b03ba1d4c4e23d555e7008088fbeed6 (patch)
tree508778c573f294043275afd1c301d8296261f2fc /dns_wizard
parent75ea9ba714c1beec5fec127b36cd0a856b64a421 (diff)
downloaddrakwizard-581d26118b03ba1d4c4e23d555e7008088fbeed6.tar
drakwizard-581d26118b03ba1d4c4e23d555e7008088fbeed6.tar.gz
drakwizard-581d26118b03ba1d4c4e23d555e7008088fbeed6.tar.bz2
drakwizard-581d26118b03ba1d4c4e23d555e7008088fbeed6.tar.xz
drakwizard-581d26118b03ba1d4c4e23d555e7008088fbeed6.zip
added explanations
Diffstat (limited to 'dns_wizard')
-rw-r--r--dns_wizard/scripts/Dnsconf.pm35
1 files changed, 28 insertions, 7 deletions
diff --git a/dns_wizard/scripts/Dnsconf.pm b/dns_wizard/scripts/Dnsconf.pm
index f5a00abb..f789f20c 100644
--- a/dns_wizard/scripts/Dnsconf.pm
+++ b/dns_wizard/scripts/Dnsconf.pm
@@ -1,5 +1,23 @@
#!/usr/bin/perl
+# DNS Config Parser
+
+# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
package Dnsconf;
require "__WIZ_HOME__/common/scripts/Vareqval.pm";
require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm";
@@ -44,8 +62,6 @@ sub do_it {
$file = "/etc/named.conf";
MDK::Common::cp_af($file, $file.".orig");
- standalone::explanations("Now putting $file configuration");
-
my $ispns1 = $ENV{wiz_ext_dns1} || "// __ISPN1__";
my $ispns2 = $ENV{wiz_ext_dns2} || "// __ISPN2__";
@@ -57,6 +73,8 @@ sub do_it {
s|__net__|$s_trunc|g;
$_;
} cat_("__WIZ_HOME__/dns_wizard/scripts/named.conf.default"));
+
+ standalone::explanations("$file : DNS1: $ispns1 DNS2: $ispns2");
# Bug fix for bind 9:
if (! -f "/etc/rndc.key") { system("touch /etc/rndc.key") or die "can not touch /etc/rndc.key"};
@@ -64,7 +82,7 @@ sub do_it {
$file="/var/named/root.hints";
-f $file and MDK::Common::cp_af($file, $file . ".orig");
MDK::Common::cp_af("__WIZ_HOME__/dns_wizard/scripts/root.hints.default", $file);
-
+ standalone::explanations("$file clobbered");
# 127.0.0.rev
$file="/var/named/127.0.0.rev";
-f $file and MDK::Common::cp_af($file, $file . ".orig");
@@ -72,6 +90,7 @@ sub do_it {
s|__hname__|$wiz_host_name|g;
$_;
} cat_("__WIZ_HOME__/dns_wizard/scripts/127.0.0.rev.default"));
+ standalone::explanations("$file : hostname: $wiz_host_name");
up_serial($file);
# $ipnet.rev
@@ -85,7 +104,8 @@ sub do_it {
$_;
} cat_("__WIZ_HOME__/dns_wizard/scripts/ipnet.rev.default"));
up_serial($file);
-
+ standalone::explanations("$file : domain: $wiz_domain_name hostname: $wiz_host_name revnet: $reversnet
+nb: $ds");
# $domain.db
$file = "/var/named/$wiz_domain_name.db";
-f $file and MDK::Common::cp_af($file, $file.".orig");
@@ -98,16 +118,17 @@ sub do_it {
$_;
} cat_("__WIZ_HOME__/dns_wizard/scripts/domain.db.default"));
up_serial($file);
-
-#resolv.conf
+ standalone::explanations("$file : domain: $wiz_domain_name hostname: $wiz_host_name revnet: $reversnet
+nb: $ds");
+# resolv.conf
$file = "/etc/resolv.conf";
-f $file and MDK::Common::cp_af($file, $file.".orig");
open(NEW, "> $file");
print NEW "domain $wiz_domain_name\n";
print NEW "nameserver $wiz_ip_server\n";
+ standalone::explanations("$file : domain: $wiz_domain_name nameserver: $wiz_ip_server");
system("/sbin/chkconfig --level 235 named on");
system("/etc/rc.d/init.d/named restart");
10;
}
-
1;