Package: nut-client
Version: 2.7.4-5.1+b1
Severity: normal
Tags: patch

Dear Maintainer,

Description
===========
I had a power failure last week and upsmon tried correctly to shutdown
the system. This did not work.

During the process I got first on all terminals the wall message:
> Executing automatic power-fail shutdown 

And at the same time in syslog:
> upsmon[2965]: Auto logout and shutdown proceeding

5 seconds later I have gotten in syslog:
> upsmon[2963]: parent: Unable to call shutdown command: /sbin/shutdown -P +0

and the shutdown was never started.

Investigation
=============
The package nut-client comes preconfigured in /etc/nut/upsmon.conf with
SHUTDOWNCMD "/sbin/shutdown -P +0"

If I run this command as root at the command line I get:
> shutdown: -H and -P flags can only be used along with -h flag.

Solution
========
I added "-h" to the SHUTDOWNCMD and the problem is gone.
SHUTDOWNCMD "/sbin/shutdown -h -P +0"

Kindly adjust the default upsmon.conf.

Thanks!
Thomas

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages nut-client depends on:
ii  adduser        3.116
ii  libc6          2.26-4
ii  libupsclient4  2.7.4-5.1+b1
ii  lsb-base       9.20170808

Versions of packages nut-client recommends:
ii  bash-completion  1:2.1-4.3

Versions of packages nut-client suggests:
pn  nut-monitor  <none>

-- Configuration Files:
/etc/nut/nut.conf [Errno 13] Permission denied: '/etc/nut/nut.conf'
/etc/nut/upsmon.conf [Errno 13] Permission denied: '/etc/nut/upsmon.conf'
/etc/nut/upssched.conf [Errno 13] Permission denied: '/etc/nut/upssched.conf'

-- no debconf information

Reply via email to