summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xclient_wizard/Bind_client.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/client_wizard/Bind_client.pm b/client_wizard/Bind_client.pm
index fc3ddc2a..4aa612f0 100755
--- a/client_wizard/Bind_client.pm
+++ b/client_wizard/Bind_client.pm
@@ -164,17 +164,12 @@ sub do_it {
my $client_name = $o->{var}{client_name};
$client_name =~ s/\.$wiz_domain_name$//;
MDK::Common::cp_af($file, $file . ".orig");
- local *NEW;
- open(NEW, ">> $file") or die "can not open $file";
- print NEW "\n$client_name IN A $o->{var}{client_ip} ; $date\n\n";
- close(NEW) or die "can not close $file";
+ append_to_file($file, "\n$client_name IN A $o->{var}{client_ip} ; $date\n\n");
up_serial($file);
$file="/var/named/$s_trunc.rev";
MDK::Common::cp_af($file, $file . ".orig");
- open(NEW, ">> $file") or die "can not open $file";
- print NEW "\n$dc IN PTR $o->{var}{client_name}. ; $date\n\n";
- close(NEW) or die "can not close $file";
+ append_to_file($file, "\n$dc IN PTR $o->{var}{client_name}. ; $date\n\n");
up_serial($file);
if (services::is_service_running('named')) {
services::restart('named');