I have two Gentoo Linux 1.4 systems sharing an APC SmartUPS. One machine is directly connected to the UPS via a serial connection - the master. Apcupsd works fine on this machine when configured with a UPSCLASS of standalone or netmaster and a UPSMODE of disable or net. The second machine derives power from the UPS, but has no direct connection. So, this machine should be a net slave. I'm not using the NIS master/slave setup. Here are the config parameters (/etc/apcupsd/apcupsd.conf) for the master: UPSCABLE 940-0024C UPSTYPE smartups DEVICE /dev/ttyS0 LOCKFILE /var/lock BATTERYLEVEL 5 MINUTES 3 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 0.0.0.0 NISPORT 3351 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS netserver UPSMODE net NETTIME 60 NETPORT 6666 SLAVE <slave-ip> STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 ...and for the slave: UPSCABLE ether UPSTYPE smartups DEVICE /dev/ttyS0 LOCKFILE /var/lock BATTERYLEVEL 0 MINUTES 0 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 0.0.0.0 NISPORT 3351 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS netslave UPSMODE net NETTIME 60 NETPORT 6666 MASTER <master-ip> STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 Note that I tried adjusting UPSCABLE, DEVICE, BATTERYLEVEL, MINUTES, and NETSERVER to see if any of those had an effect on the situation, but they did not. I didn't make this a critical bug because there is the possibility of using NIS instead of this simpler master/slave configuration. However, someone expecting or relying on this particular method are out of luck for now. Reproducible: Always Steps to Reproduce: 1. Configure master and slave with the respective apcupsd.conf files listed. 2. Do normal rc-update procedure for apcupsd on master and run via "/etc/init.d/apcupsd start". 3. Just try launching apcupsd directly from the CLI on the slave. --OR-- also handle like master. Actual Results: Slave apcupsd returns immediately to the command-line without error. Doing a "ps aux" shows that apcupsd is not running. /var/run/apcupsd.pid contains a PID that doesn't exist. /var/log/apcupsd.events is created, but empty. No information logged to /var/log/messages, syslog, or daemon.log If run via /etc/init.d, apcupsd on the slave also abends, but leaves behind the entry in /var/lib/init.d/started. Expected Results: If run via the CLI, apcupsd should not return to the command-line under normal circumstances. If run via /etc/init.d, it should behave as most daemons.
As of today (11/15/2003) I no longer experience this problem. I did a system update and apcupsd is now at version 3.10.6. The prior version was 3.10.5-r3.
fine, so this is fixed now :)