From 95e44f068bf13b19861d5d82111e0610ce02840b Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 3 Jul 2012 09:11:45 -0400 Subject: Fix nut for 2.1 --- config/nut/nut.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3