diff options
Diffstat (limited to 'dns_wizard')
-rw-r--r-- | dns_wizard/scripts/Dnsconf.pm | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/dns_wizard/scripts/Dnsconf.pm b/dns_wizard/scripts/Dnsconf.pm index 11f92a99..0b1921f0 100644 --- a/dns_wizard/scripts/Dnsconf.pm +++ b/dns_wizard/scripts/Dnsconf.pm @@ -26,7 +26,7 @@ sub up_serial { } close(OLD) or die "can't close $file: $!"; close(NEW) or die "can't close $tmp: $!"; - MDK::Common::cp_af($tmp, $file); + system("mv $tmp $file"); } sub do_it { @@ -73,8 +73,7 @@ sub do_it { } close(OLD); close(NEW); - MDK::Common::cp_af($tmp, $file); -# MDK::Common::rm_rf($tmp); + system("mv $tmp $file"); # Bug fix for bind 9: if (! -f "/etc/rndc.key") {system("touch /etc/rndc.key") or die "can not touch /etc/rndc.key: $!"}; @@ -96,16 +95,15 @@ sub do_it { } close(OLD); close(NEW); - MDK::Common::cp_af($tmp, $file); -# MDK::Common::rm_rf($tmp); + system("mv $tmp $file"); up_serial($file); #ipnet.rev $file = "/var/named/$s_trunc.rev"; MDK::Common::cp_af($file, $file.".orig"); - my $tmp = `mktemp /tmp/Dnsconf.XXXXXX` or + my $tmp = `mktemp /tmp/Dnsconf.XXXXXX` or die "can't make a temp file: $!"; - open(NEW, "> $tmp") or + open(NEW, "> $tmp") or die "can't open $tmp: $!"; open(OLD, "< __WIZ_HOME__/dns_wizard/scripts/ipnet.rev.default") or die "can't open default: $!"; @@ -118,17 +116,16 @@ sub do_it { } close(OLD); close(NEW); - MDK::Common::cp_af($tmp, $file); -# MDK::Common::rm_rf($tmp); + system("mv $tmp $file"); up_serial($file); $file = "/var/named/$wiz_domain_name.db"; MDK::Common::cp_af($file, $file.".orig"); - my $tmp = `mktemp /tmp/Dnsconf.XXXXXX` or + my $tmp = `mktemp /tmp/Dnsconf.XXXXXX` or die "can't make a temp file: $!"; - open(NEW, "> $tmp") or + open(NEW, "> $tmp") or die "can't open $tmp: $!"; - open(OLD, "< __WIZ_HOME__/dns_wizard/scripts/domain.db.default") or + open(OLD, "< __WIZ_HOME__/dns_wizard/scripts/domain.db.default") or die "can't open default: $!"; while (<OLD>) { s|__dname__|$wiz_domain_name|g; @@ -139,8 +136,7 @@ sub do_it { } close(OLD); close(NEW); - MDK::Common::cp_af($tmp, $file); -# MDK::Common::rm_rf($tmp); + system("mv $tmp $file"); up_serial($file); #resolv.conf |