From 11242b809f8084c58e7fc306c3edaf8781af6f18 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 23 Aug 2008 20:09:24 -0700 Subject: never unlink the .pam-old file - just only create it if --force is set. --- debian/local/pam-auth-update | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index a1761908..2a8de8e8 100755 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -397,15 +397,11 @@ 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 - # FIXME: if there was already a .pam-old file, and we're - # going to unlink the old version afterwards, we've clobbered - # the user's old version for no reason! - if (-e "$target") { + if (-e "$target" && $force) { system('cp','-f',$target,$target . '.pam-old'); } rename($dest,$target); rename("$savedir/$type.new","$savedir/$type"); - unlink($target . '.pam-old') if (!$force); } # at the end of a successful write, reset the 'seen' flag and the -- cgit v1.2.3