Bug: NUT missing file and can't create pid.

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
There are two issues with NUT UPS package.

1) NUT is missing the description file in /usr/local/etc/nut/cmdvartab
- a copy from pfsense is enclosed

If I add the file, it is removed upon reboot. How can I make this permanent?

2) Loading upsd causes the below error
fopen /var/db/nut/uspd.pid
 

Attachments

  • cmdvartab.zip
    3.1 KB · Views: 290

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Are you trying to start NUT from CLI, or via the UPS service?
 

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
Are you trying to start NUT from CLI, or via the UPS service?

I get the two errors during boot i.e. that cmdvartab is missing and missing upsd.pid so that is from the gui config.
for testing to try and debug, i am starting via CLI.

adding the cmdvartab file fixes the error, but the file is removed after reboot
i suspect the upsd.pid is related to permissions? as i see it is also a frequent problem on freebsd
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, both of those errors are cosmetic, and don't affect the functionality of NUT. The actual PID file will have a name in /var/db/nut of <NUT driver>-ups-<UPS name>.pid.
 

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
I appreciate they maybe cosmetic, but the cmdvartab is an easy fix.
I just need to add the file to /usr/local/etc/nut except truenas keeps removing it.

from boot for the pid file, i see /var/db/nut/
upsd.pid - uucp
upsmon.pid - root
upslog.pid - root
usbhid-ups-ups - uucp
usbhid-ups-ups.pid - uucp

so the files are created when the nut script is run during boot, but give the following errors
Network UPS Tools upsd
fopen /var/db/nut/upsd.pid No such file or directory
Network UPS Tools upsmon
fopen /var/db/nut/upsmon.pid No such file or directory
 

Revan

Explorer
Joined
Mar 22, 2017
Messages
81
I have the same problem here:

A quick and dirty workaround might be to just copy it back with a cron script that tests if it is still there.
 
Top