Bug 180336

Summary: [PATCH] sysutils/apcupsd: support multiple instances of apcupsd
Product: Ports & Packages Reporter: Craig Leres <leres>
Component: Individual Port(s)Assignee: Danilo G. Baio <dbaio>
Status: Closed FIXED    
Severity: Affects Only Me CC: dbaio, eugen, leres
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D11224
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202863
Bug Depends on:    
Bug Blocks: 220002    
Attachments:
Description Flags
patch.txt
none
Patch to files/apcupsd.in
none
Patch to files/apcupsd.in none

Description Craig Leres freebsd_committer 2013-07-05 23:30:00 UTC
	It's possible to run multiple instances of apcupsd on a
	single host but the current rc.d script doesn't allow this.

Fix: The attached patch updates apcupsd.in to manage more than
	one apcupsd by adding a list of configuration files to
	/etc/rc.conf, e.g.:

	    apcupsd_enable="YES"
	    apcupsd_configs="
		/usr/local/etc/apcupsd/apcupsd.conf
		/usr/local/etc/apcupsd/apcupsd2.conf
		"
	    apcupsd_flags=""
Comment 1 Edwin Groothuis freebsd_committer 2013-07-05 23:30:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Craig Leres freebsd_committer 2014-07-26 03:34:12 UTC
Created attachment 144988 [details]
Patch to files/apcupsd.in

Here's an updated patch that handles restart correctly.
Comment 3 Craig Leres freebsd_committer 2014-07-31 07:10:43 UTC
Created attachment 145176 [details]
Patch to files/apcupsd.in

Fix to the last patch, %%ETCDIR%% already has /apcupsd in it.
Comment 4 Rene Ladan freebsd_committer 2017-02-27 20:49:21 UTC
Maintainer reset.
Comment 5 Eugene Grosbein freebsd_committer 2017-05-24 13:01:02 UTC
Is this PR still relevant?
Comment 6 Craig Leres freebsd_committer 2017-05-31 15:50:26 UTC
Yes; I've been running the patched rc.d script locally for years.

If you like I'm willing to become the maintainer for this port.
Comment 7 Danilo G. Baio freebsd_committer 2017-06-15 16:57:48 UTC
I'll take it.
Comment 8 commit-hook freebsd_committer 2017-06-19 22:46:36 UTC
A commit references this bug:

Author: dbaio
Date: Mon Jun 19 22:45:58 UTC 2017
New revision: 443914
URL: https://svnweb.freebsd.org/changeset/ports/443914

Log:
  sysutils/apcupsd: Several improvements

  Add support for running multiple instances of apcupsd[1]
  Add an option to use `shutdown -p` rather than `shutdown -h`[2]
  Set as @sample several scripts that can be customized[3]
  Add an option for build with MODBUS USB driver support (Enabled by default)[4]
  Set LICENSE_FILE [5]
  Sort OPTIONS and make a small adjustment in pkg-message
  Take maintainer'ship

  PR:		180336 [1]
  PR:		187924 [2][3]
  PR:		215809 [4]
  PR:		220002 [5]

  Submitted by:	leres@ee.lbl.gov [1]
  Submitted by:	tdb [3]
  Submitted by:	ipluta@wp.pl [4]
  Submitted by:	takefu@airport.fm [5]

  Approved by:	garga (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11224

Changes:
  head/sysutils/apcupsd/Makefile
  head/sysutils/apcupsd/files/apcupsd.in
  head/sysutils/apcupsd/files/patch-platforms_etc_Makefile
  head/sysutils/apcupsd/files/pkg-message.in
  head/sysutils/apcupsd/pkg-plist
Comment 9 Danilo G. Baio freebsd_committer 2017-06-19 22:49:27 UTC
Committed, thanks.