|Summary:||Red Hat NUT only supports one UPS on a system|
|Product:||[Retired] Red Hat Linux||Reporter:||C.M. Connelly <cmc>|
|Component:||nut||Assignee:||Ngo Than <than>|
|Status:||CLOSED RAWHIDE||QA Contact:||Brian Brock <bbrock>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2003-09-09 15:54:51 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
Description C.M. Connelly 2002-12-11 22:44:10 UTC
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 Description of problem: Red Hat's NUT configuration only allows you to attach and monitor one UPS on a single system. UPS details are specified in /etc/sysconfig/ups, which is read by /etc/init.d/ups. Unfortunately, this setup only allows you to enter information for a single UPS. Additional UPSs can be defined in /etc/ups/ups.conf and activated by hand (by running <driver> -a <upsname>), but there is no way of automating the loading of these additional drivers without extensively modifying the init.d script. Debian supports multiple UPSs, but does so by requiring you to define them in upsd.conf, which is deprecated. The main issue here is that the init script is starting things by reading a Red Hat specific file in /etc/sysconfig instead of by reading the NUT configuration from ups.conf. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: Not really a question of reproducing the problem -- it's fundamental to the way that Red Hat has chosen to manage the configuration information. Actual Results: Only the driver for the UPS defined in /etc/sysconfig/ups is loaded when the init.d script is run. Additional UPSs are ignored, and drivers must be started by hand or by another script. Expected Results: All UPSs defined in /etc/ups/ups.conf should be monitored. Additional info: If you want to keep the redundant configuration in /etc/sysconfig, then perhaps the init.d script could be modified to read multiple files starting with ups -- ups1, ups2, etc. -- and do a loop over the code that loads the drivers. Otherwise the script should parse the /etc/ups/ups.conf file, and run commands as necessary for each of the UPSs defined in that file.
Comment 1 Markku Kolkka 2003-02-13 13:00:55 UTC
The /etc/sysconfig/ups file is completely redundant and should be removed. The method used to start the UPS driver in /etc/init.d/ups is deprecated and upsdrvctl should be used instead.
Comment 2 Gilbert E. Detillieux 2003-05-14 18:33:16 UTC
Created attachment 91679 [details] add upsdrvctl support to /etc/rc.d/init.d/ups This patch to ups.init (installed as /etc/rc.d/init.d/ups) will let you run upsdrvctl (e.g. to support multiple drivers) rather than a single driver. Set the MODEL variable in /etc/sysconfig/ups as follows to enable this: MODEL=upsdrvctl
Comment 3 Gilbert E. Detillieux 2003-05-14 20:04:02 UTC
Created attachment 91681 [details] add upsdrvctl support to /etc/rc.d/init.d/halt This patch needs to be applied to initscripts-6.40/rc.d/init.d/halt (in the corresponding initscripts package, of course), to allow proper UPS shutdown when MODEL=upsdrvctl is used in /etc/sysconfig/ups. I've submitted it here since it's related to my previous patch, even though it applies to a file that's not part of the nut packages, per se.
Comment 4 Ngo Than 2003-09-09 15:54:51 UTC
i have added your into 1.4.0-1, which will be available in rawhide soon. many thanks for your patch files and report.