Page MenuHomeFreeBSD

sysutils/apcupsd: Several improvements
ClosedPublic

Authored by dbaio on Jun 15 2017, 6:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 11:56 AM
Unknown Object (File)
Fri, Mar 29, 8:48 PM
Unknown Object (File)
Thu, Mar 28, 2:50 PM
Unknown Object (File)
Mar 4 2024, 12:42 PM
Unknown Object (File)
Mar 3 2024, 12:44 PM
Unknown Object (File)
Mar 2 2024, 6:39 PM
Unknown Object (File)
Mar 2 2024, 6:27 PM
Unknown Object (File)
Jan 13 2024, 12:06 PM
Subscribers

Details

Summary
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
Test Plan
$ portlint -C
WARN: Makefile: SHUTDOWN_POWEROFF is listed in OPTIONS_DEFINE, but no PORT_OPTIONS:MSHUTDOWN_POWEROFF appears.
WARN: Makefile: possible use of absolute pathname "/sbin/shutdown".
WARN: /usr/home/dbaio/ports/sysutils/apcupsd/distinfo: [1]: TIMESTAMP is over 30 days old
0 fatal errors and 3 warnings found.

poudriere testport:

10.3-RELEASE-p19 amd64
10.3-RELEASE-p19 i386
11.0-RELEASE-p10 amd64
11.0-RELEASE-p10 i386
12.0-CURRENT 1200031 amd64
12.0-CURRENT 1200031 i386

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Maybe SHUTDOWN_POWEROFF should be on by default?

Hi.

I left this option disabled because it will change the comportment in power outages for many users that are using the shutdown -h behavior.

For instance, with IBM servers, If a power failure occurs while the server is turned on, the server will restart automatically when power is restored. And with some systems in the halt state, that is what will happen.

From APC: Computer will not automatically reboot after UPS has shutdown and restarted

ALWAYS ON: When power is cycled on, the computer will automatically turn on and boot up.
ALWAYS OFF: When power is cycled on, the computer will stay off until the user manually hits the On/Off soft switch.
LAST STATE: When power is cycled on, the computer will either come on or stay off depending on whether it was On or Off when the power was lost.

More info here.
IBM

Changing this for shutdown -p now worries me because of this, and IMHO, it seems to be a POLA violation.

Makes any sense?

I'm open for discussion.

Regards.

Ok, yup, you make some very good points. Your current plan having it as a default off option makes the most sense.

This revision is now accepted and ready to land.Jun 19 2017, 11:10 AM
This revision was automatically updated to reflect the committed changes.