summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-04-23 12:55:32 +0200
committerChristian Poessinger <christian@poessinger.com>2019-04-23 12:57:13 +0200
commitad0de9615f04ed1e172e9bf8430857cb911d5fa3 (patch)
tree941b9966beb60a8d1669c0a67f8538eb15df51f0 /lib/Vyatta
parentf2b1452c817f5f8a90f338a65ba8016b50ddf31a (diff)
downloadvyatta-cfg-system-ad0de9615f04ed1e172e9bf8430857cb911d5fa3.tar.gz
vyatta-cfg-system-ad0de9615f04ed1e172e9bf8430857cb911d5fa3.zip
T1345: fix Perl error when removing RADIUS configuration
(cherry picked from commit ac13c77d7ddd607b32f5948560bfe41cb2dcd756)
Diffstat (limited to 'lib/Vyatta')
-rw-r--r--lib/Vyatta/Login/Radius.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Vyatta/Login/Radius.pm b/lib/Vyatta/Login/Radius.pm
index 53c92673..07da9d8c 100644
--- a/lib/Vyatta/Login/Radius.pm
+++ b/lib/Vyatta/Login/Radius.pm
@@ -39,8 +39,9 @@ sub remove_pam_radius {
"pam-auth-update --package --remove radius") == 0
or die "pam-auth-update remove failed";
- unlink($PAM_RAD_AUTH)
- or die "Can't remove $PAM_RAD_AUTH";
+ if (-e $PAM_RAD_AUTH) {
+ unlink ($PAM_RAD_AUTH) or die "Can't remove $PAM_RAD_AUTH";
+ }
}
sub add_pam_radius {