Actions
Bug #3248
closedNUT package fails to write config to upsd.users
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Nut
Target version:
-
Start date:
10/02/2013
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
Affected Version:
2.1
Affected Plus Version:
Affected Architecture:
Description
The configuration driver for the NUT package is testing obsolete variable "allowaddr" in order to determine if it should write the remote user configuration to upsd.users. It shoud be testing "allowuser" and "allowpass" as NUT requires both to be present in the upsd.users file.
The patch below corrects the issue.
Denny
*** nut.inc.org Tue Sep 17 00:16:54 2013 --- nut.inc Wed Oct 2 11:53:29 2013 *************** *** 272,278 **** $upsd_users = "[monuser]\n"; $upsd_users .= "password = {$password}\n"; $upsd_users .= "upsmon master\n"; ! if($allowaddr && $allowuser) { $upsd_users .= "\n[$allowuser]\n"; $upsd_users .= "password = $allowpass\n"; $upsd_users .= "upsmon master\n"; --- 272,278 ---- $upsd_users = "[monuser]\n"; $upsd_users .= "password = {$password}\n"; $upsd_users .= "upsmon master\n"; ! if($allowuser && $allowpass) { $upsd_users .= "\n[$allowuser]\n"; $upsd_users .= "password = $allowpass\n"; $upsd_users .= "upsmon master\n"; *************** *** 356,362 **** $snmpcommunity = nut_config('snmpcommunity'); $snmpfreq = nut_config('snmpfreq'); $snmpdisabletransfer = (nut_config('snmpdisabletransfer') == 'on'); - $allowaddr = nut_config('allowaddr'); $allowuser = nut_config('allowuser'); $allowpass = nut_config('allowpass'); --- 356,361 ---- *************** *** 389,395 **** $upsd_users = "[monuser]\n"; $upsd_users .= "password = {$password}\n"; $upsd_users .= "upsmon master\n"; ! if($allowaddr && $allowuser) { $upsd_users .= "\n[$allowuser]\n"; $upsd_users .= "password = $allowpass\n"; $upsd_users .= "upsmon master\n"; --- 388,394 ---- $upsd_users = "[monuser]\n"; $upsd_users .= "password = {$password}\n"; $upsd_users .= "upsmon master\n"; ! if($allowuser && $allowpass) { $upsd_users .= "\n[$allowuser]\n"; $upsd_users .= "password = $allowpass\n"; $upsd_users .= "upsmon master\n";
Updated by Renato Botelho over 11 years ago
Please send the patch as a pull request on github.
Updated by Renato Botelho over 11 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset commit:d199db0bc5bf99c77ec29d01edb646b7713cc9a8.
Updated by Denny Page over 11 years ago
I've been running this patch for over 3 months without issue. For what it's worth, I've also tested against current 2.1.1 snapshots.
Actions