diff options
author | Alexander Wilke <nachtfalkeaw@web.de> | 2012-02-10 20:22:51 +0100 |
---|---|---|
committer | Alexander Wilke <nachtfalkeaw@web.de> | 2012-02-10 20:22:51 +0100 |
commit | aca3110bb649b46722d02c3780b7d7f5903faa47 (patch) | |
tree | fd70ec365055b4cd60eed868c23c720d24ea06ce | |
parent | 4af644e6a3d1f95eee6ba95cb760fffaa7a608e5 (diff) | |
download | pfsense-packages-aca3110bb649b46722d02c3780b7d7f5903faa47.tar.gz pfsense-packages-aca3110bb649b46722d02c3780b7d7f5903faa47.tar.bz2 pfsense-packages-aca3110bb649b46722d02c3780b7d7f5903faa47.zip |
additional checks
-rw-r--r-- | config/freeradius2/freeradius.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc index 51029711..1af36665 100644 --- a/config/freeradius2/freeradius.inc +++ b/config/freeradius2/freeradius.inc @@ -3855,9 +3855,13 @@ function freeradius_motp_resync() { // check if disabled then we delete bash und otpverify.sh script if ($varsettings['varsettingsmotpenable'] == '') { - unlink("/usr/local/bin/otpverify.sh"); - exec("cd /var/db/pkg && pkg_delete `ls | grep bash`"); - log_error('FreeRADIUS: Uninstalling package "bash-4.1.7" which comes with Mobile-One-Time-Password (motp) if not already done.'); + if (file_exists("/usr/local/bin/otpverify.sh")) { + unlink("/usr/local/bin/otpverify.sh"); + } + if (exec("cd /var/db/pkg && ls | grep bash") == "bash-4.1.7") { + exec("cd /var/db/pkg && pkg_delete `ls | grep bash`"); + log_error('FreeRADIUS: Uninstalling package "bash-4.1.7" which comes with Mobile-One-Time-Password (motp).'); + } } // check if enabled then we need to download "bash" |