From fcecf3a222ca2c1474f6ae8827263b61414df1d6 Mon Sep 17 00:00:00 2001 From: Alexander Wilke Date: Mon, 25 Jun 2012 21:08:35 +0300 Subject: freeradius2: check if it needs to be uninstalled the old way or not --- config/freeradius2/freeradius.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc index 0e31b8d1..7c5cd914 100644 --- a/config/freeradius2/freeradius.inc +++ b/config/freeradius2/freeradius.inc @@ -56,9 +56,11 @@ if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.0") { // End of system check function freeradius_deinstall_command() { - exec("cd /var/db/pkg && pkg_delete `ls | grep freeradius`"); - exec("rm -rf " . RADDB); - exec("rm -rf /var/run/radiusd/"); + if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.0") { + exec("cd /var/db/pkg && pkg_delete `ls | grep freeradius`"); + exec("rm -rf " . RADDB); + exec("rm -rf /var/run/radiusd/"); + } } function freeradius_install_command() { -- cgit v1.2.3