aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorRyan Wagoner <rsw686@pfsense.org>2007-02-19 20:40:53 +0000
committerRyan Wagoner <rsw686@pfsense.org>2007-02-19 20:40:53 +0000
commitc1fd61c0b7fedd0198d951c7e4466fd0566100f2 (patch)
tree0ca6bc6c3b0c67a6b2eb5633b09482f4808edc28 /packages
parenta7d30006575ebd05e4577449166ec521e1919b46 (diff)
downloadpfsense-packages-c1fd61c0b7fedd0198d951c7e4466fd0566100f2.tar.gz
pfsense-packages-c1fd61c0b7fedd0198d951c7e4466fd0566100f2.tar.bz2
pfsense-packages-c1fd61c0b7fedd0198d951c7e4466fd0566100f2.zip
-fix permission problem when using usb ups
Diffstat (limited to 'packages')
-rw-r--r--packages/nut/nut.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/nut/nut.inc b/packages/nut/nut.inc
index b26b405f..d9097788 100644
--- a/packages/nut/nut.inc
+++ b/packages/nut/nut.inc
@@ -251,8 +251,10 @@ EOD;
chown($port, 'uucp');
/* ups.conf */
- if($port == 'auto')
+ if($port == 'auto') {
$ups_conf = "user=root\n";
+ $ovr_user = '-u root';
+ }
$ups_conf .= "[{$name}]\n";
$ups_conf .= "driver={$driver}\n";
$ups_conf .= "port={$port}\n";
@@ -324,7 +326,7 @@ if [ `pgrep {$driver} | wc -l` != 0 ]; then
echo starting {$driver}
if /usr/local/libexec/nut/upsdrvctl start; then
echo starting upsd
- /usr/local/sbin/upsd
+ /usr/local/sbin/upsd {$ovr_user}
echo starting upsmon
/usr/local/sbin/upsmon {$name}@localhost
else