From f24d21fd430dee3477ccb85b9cc24c4cb7764c98 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 30 Apr 2015 15:43:30 -0300 Subject: Fix pbi detect for sudo --- config/sudo/sudo.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'config/sudo') diff --git a/config/sudo/sudo.inc b/config/sudo/sudo.inc index a8107029..1c07984d 100644 --- a/config/sudo/sudo.inc +++ b/config/sudo/sudo.inc @@ -31,11 +31,6 @@ require_once("config.inc"); global $pfs_version; $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); switch ($pfs_version) { - case "1.2": - case "2.0": - define('SUDO_BASE','/usr/local'); - define('SUDO_LIBEXEC_DIR', '/usr/local/libexec/sudo'); - break; case "2.1": // Hackish way to detect if someone manually did pkg_add rather than use pbi. if (is_dir('/usr/pbi/sudo-' . php_uname("m"))) { @@ -46,7 +41,7 @@ switch ($pfs_version) { define('SUDO_LIBEXEC_DIR', '/usr/local/libexec/sudo'); } break; - default: + case "2.2": define('SUDO_BASE','/usr/local'); // Hackish way to detect if someone manually did pkg_add rather than use pbi. if (is_dir('/usr/pbi/sudo-' . php_uname("m"))) { @@ -54,6 +49,10 @@ switch ($pfs_version) { } else { define('SUDO_LIBEXEC_DIR', '/usr/local/libexec/sudo'); } + break; + default: + define('SUDO_BASE','/usr/local'); + define('SUDO_LIBEXEC_DIR', '/usr/local/libexec/sudo'); } define('SUDO_CONFIG_DIR', SUDO_BASE . '/etc'); -- cgit v1.2.3