From 6e8351b0ed1f24548d0d546e6ab8904e2188e05f Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 27 Jun 2022 22:44:40 -0700 Subject: [PATCH] Use standard functions --- postfix/postfix-lib.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/postfix/postfix-lib.pl b/postfix/postfix-lib.pl index ba1b375fe..807eb6913 100755 --- a/postfix/postfix-lib.pl +++ b/postfix/postfix-lib.pl @@ -1516,7 +1516,7 @@ sub before_save { if ($config{'check_config'} && !defined($save_file)) { $save_file = &transname(); - &execute_command("cp $config{'postfix_config_file'} $save_file"); + ©_source_dest($config{'postfix_config_file'}, $save_file); } } @@ -1525,11 +1525,12 @@ sub after_save if (defined($save_file)) { local $err = &check_postfix(); if ($err) { - &execute_command("mv $save_file $config{'postfix_config_file'}"); + ©_source_dest($save_file, $config{'postfix_config_file'}); + &unlink_file($save_file); &error(&text('after_err', "
$err
")); } else { - unlink($save_file); + &unlink_file($save_file); $save_file = undef; } }