[Nut-upsuser] USB UPS and FreeBSD

Daniel O'Connor doconnor at gsoft.com.au
Mon May 22 23:18:30 UTC 2006

On Monday 22 May 2006 23:36, Scott Tuc Ellentuch at T-B-O-H wrote:
> 	I was wondering as a fellow FreeBSD user, where
> did you do the "upsdrvctl shutdown" command?
> 	For the others, there was mention of "rc.early",
> but it seems that it is not run during shutdown.

There is /etc/rc.shutdown.

What I have is a script in /usr/local/etc/rc.d called nut.sh. It starts and 
stops the NUT daemons. If it has been asked to stop it, it checks if the 
killpower flag is present and if so, it runs upsdrvctl with the option to 
shutdown the UPS.

Make sure you have a shutdown gracedelay though - FreeBSD doesn't run any 
scripts after the disks are unmounted so you must start the UPS shutdown 
phase before the disks are unmounted, hence the need for a grace delay.

Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20060523/363307f6/attachment.pgp

More information about the Nut-upsuser mailing list