NUT
Let's have a look at the manual entry for the command upsd
of the NUT
package :
NAME
upsd - UPS information server
SYNOPSIS
upsd -h
upsd [OPTIONS]
...
OPTIONS
-h
Display the help text.
Ok, let's try it.
# upsd
# echo $?
1
# upsd -h
# echo $?
1
: after editing nut.conf
# upsd -h
Network UPS Tools upsd 2.7.4
Network server for UPS data.
...
# echo $?
0
I guess if there is a parse error in upsd.conf
they call exit(1);
directly.
Why not print ANY error message ?