# Powstatd for UPS monitor



## freebuser (Mar 23, 2012)

Hi,

After NUT mysteriously stopped working on my server I am back again to see whether I can port powstatd to FreeBSD. When I compile I got an error as follows:


```
error: 'TCSBRKP' undeclared (first use in this function)
```

I commented the TCSBRKP line to see any effects, then I got the above error for SIGPWR. I commented that line too to see the compilation. The compile was succesfull, when I run powstatd in test mode and daemon mode it detects the power failures and changes /usr/local/etc/powerstatus appropriately (either with OK or FAIL). However powstatd was unable to execute the relev*a*nt init files.

Can someone please help me to port this software to FreeBSD? Currently this is the only thing which stops me from migrating from Debian to FreeBSD. The attachment is of original software. From another forum I found this for SIGPWR:


```
#define SIGPOLL 23
#define SIGPWR 29
#define SIGIO SIGPOLL
#define SIGLOST SIGPWR
```

Not sure whether this will help in getting rid of the SIGPWR error.

Thanks,


----------

