diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-04-30 15:43:30 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-04-30 15:43:30 -0300 |
commit | f24d21fd430dee3477ccb85b9cc24c4cb7764c98 (patch) | |
tree | 50b6a55eec155f1fa0854c7fedc9ad22682ac31e | |
parent | 0361e2d755dda63d8450c7c5d370962684f71033 (diff) | |
download | pfsense-packages-f24d21fd430dee3477ccb85b9cc24c4cb7764c98.tar.gz pfsense-packages-f24d21fd430dee3477ccb85b9cc24c4cb7764c98.tar.bz2 pfsense-packages-f24d21fd430dee3477ccb85b9cc24c4cb7764c98.zip |
Fix pbi detect for sudo
-rw-r--r-- | config/sudo/sudo.inc | 11 |
1 files changed, 5 insertions, 6 deletions
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'); |