summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2008-08-21 11:32:07 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:28:26 -0800
commitae8bdcf6572efa83fbe8a3a05b41808b0cfc5dae (patch)
treecea13d86265489573f6f58659743c196722af06d
parent2bf2764701f3764baca990319cfeb55a28c5e896 (diff)
if the target doesn't already exist, don't try to copy it
-rwxr-xr-xdebian/local/pam-auth-update4
1 files changed, 3 insertions, 1 deletions
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);