aboutsummaryrefslogtreecommitdiffstats
path: root/config/nut
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-07-03 09:11:45 -0400
committerjim-p <jimp@pfsense.org>2012-07-03 09:11:45 -0400
commit95e44f068bf13b19861d5d82111e0610ce02840b (patch)
treebee6380cb05eaccdd32990c52ff6412cfd62d826 /config/nut
parented3396c89b9eeb27ffc70ed9f896036d9c234292 (diff)
downloadpfsense-packages-95e44f068bf13b19861d5d82111e0610ce02840b.tar.gz
pfsense-packages-95e44f068bf13b19861d5d82111e0610ce02840b.tar.bz2
pfsense-packages-95e44f068bf13b19861d5d82111e0610ce02840b.zip
Fix nut for 2.1
Diffstat (limited to 'config/nut')
-rw-r--r--config/nut/nut.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/nut/nut.inc b/config/nut/nut.inc
index 28ff3999..d5c81884 100644
--- a/config/nut/nut.inc
+++ b/config/nut/nut.inc
@@ -34,7 +34,12 @@
/* Nut */
define('NUT_RCFILE', '/usr/local/etc/rc.d/nut.sh');
- define('NUT_DIR','/usr/local/etc/nut');
+
+ if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.0") {
+ define('NUT_DIR','/usr/local/etc/nut');
+ } else {
+ define('NUT_DIR', '/usr/pbi/nut-' . php_uname("m") . '/etc/nut');
+ }
function nut_notice ($msg) { syslog(LOG_NOTICE, "nut: {$msg}"); return; }
function nut_warn ($msg) { syslog(LOG_WARNING, "nut: {$msg}"); return; }