diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-07-26 11:51:59 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-07-26 11:51:59 +0000 |
commit | e2f5bef5f4c0b287600a553431edca6c2bad18e5 (patch) | |
tree | 7a553e10e62116c01c04ac3985426e1ff2b50c31 /dns_wizard/scripts | |
parent | 2ca038cada0fea693b5e3f6b157deefd5c644d8d (diff) | |
download | drakwizard-e2f5bef5f4c0b287600a553431edca6c2bad18e5.tar drakwizard-e2f5bef5f4c0b287600a553431edca6c2bad18e5.tar.gz drakwizard-e2f5bef5f4c0b287600a553431edca6c2bad18e5.tar.bz2 drakwizard-e2f5bef5f4c0b287600a553431edca6c2bad18e5.tar.xz drakwizard-e2f5bef5f4c0b287600a553431edca6c2bad18e5.zip |
clean tmp
Diffstat (limited to 'dns_wizard/scripts')
-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 |