summaryrefslogtreecommitdiff
path: root/debian/local/pam-auth-update
diff options
context:
space:
mode:
Diffstat (limited to 'debian/local/pam-auth-update')
-rwxr-xr-xdebian/local/pam-auth-update6
1 files changed, 1 insertions, 5 deletions
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