diff options
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/local/pam-auth-update | 4 |
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); |