Bug 263855

Summary: sysutils/nut: [nut-2.7.4_20] replace shutdown command in /usr/local/etc/nut/upsmon.conf from HALT TO POWEROFF KIND OF STATE
Product: Ports & Packages Reporter: clear.screen
Component: Individual Port(s)Assignee: Cy Schubert <cy>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (cy)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description clear.screen 2022-05-07 23:37:21 UTC
Purpose of stopping a system in case of power loss is to electrically power down the machine to avoid any trouble in the power supply

in SHUTDOWNCMD "/sbin/shutdown -p +0"
the default command is SHUTDOWNCMD "/sbin/shutdown -h +0"
this should be replaced by SHUTDOWNCMD "/sbin/shutdown -p +0"

in order to power down the machine and avoid trouble in halt state (system alted but computer still powered)
Comment 1 clear.screen 2022-05-07 23:51:25 UTC
package is : nut-2.7.4_20
Comment 2 clear.screen 2022-05-08 00:14:35 UTC
#1 : the file location was missing (really sorry - wrong copy paste)
#2 : only poweroff can lead to correct power supply off state on my machine

--------------------------
Correct bug description is
--------------------------

in package  nut-2.7.4_20

The purpose of stopping a system in case of power loss is to electrically power down the machine to avoid any trouble in the power supply

==>> in the file /usr/local/etc/nut/upsmon.conf

The default command is SHUTDOWNCMD "/sbin/shutdown -h +0"
should be replaced by SHUTDOWNCMD "poweroff"

This is in order to power down the machine and avoid trouble in halt state (system alted but computer still powered)

This has to be tested in several real machines
Test machine is HPE ML110 Gen9
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2022-05-08 13:30:38 UTC
I can't fix that package because 2.8.0 is the main tree and MFH of 2.8.0 to quarterly is not advised. The 2.8.0 package will be fixed.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-05-09 18:12:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3b7f73015c06f08c2b64d7def022151872bf1cfc

commit 3b7f73015c06f08c2b64d7def022151872bf1cfc
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-05-08 13:20:06 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-05-09 17:49:29 +0000

    sysutils/nut*: Use poweroff instead of shutdown -h

    Poweroff instead of halt when signaling shutdown.

    PR:             263855
    Reported by:    clear.screen@orange.fr

 sysutils/nut-devel/Makefile                                   |  2 +-
 .../nut-devel/files/patch-conf_upsmon.conf.sample.in (new)    | 11 +++++++++++
 sysutils/nut/Makefile                                         |  2 +-
 sysutils/nut/files/patch-conf_upsmon.conf.sample.in (new)     | 11 +++++++++++
 4 files changed, 24 insertions(+), 2 deletions(-)