From ae8bdcf6572efa83fbe8a3a05b41808b0cfc5dae Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 21 Aug 2008 11:32:07 -0700 Subject: if the target doesn't already exist, don't try to copy it --- debian/local/pam-auth-update | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 2a5ae0c0..3df71cc1 100755 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -384,7 +384,9 @@ sub write_profiles # then do the renames, back-to-back # we have to use system because File::Copy is in # perl-modules, not perl-base - system('cp','-f',$target,$target . '.pam-old'); + if (-e "$target") { + system('cp','-f',$target,$target . '.pam-old'); + } rename($dest,$target); rename("$savedir/$type.new","$savedir/$type"); unlink($target . '.pam-old') if (!$force); -- cgit v1.2.3