aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-30 15:43:30 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-30 15:43:30 -0300
commitf24d21fd430dee3477ccb85b9cc24c4cb7764c98 (patch)
tree50b6a55eec155f1fa0854c7fedc9ad22682ac31e /config
parent0361e2d755dda63d8450c7c5d370962684f71033 (diff)
downloadpfsense-packages-f24d21fd430dee3477ccb85b9cc24c4cb7764c98.tar.gz
pfsense-packages-f24d21fd430dee3477ccb85b9cc24c4cb7764c98.tar.bz2
pfsense-packages-f24d21fd430dee3477ccb85b9cc24c4cb7764c98.zip
Fix pbi detect for sudo
Diffstat (limited to 'config')
-rw-r--r--config/sudo/sudo.inc11
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');