Sun 23 Mar 2008

UPS annoyances

My NAS is plugged into my APC 550 UPS. The UPS's USB status cable is plugged into the NAS, so it gets notified of status changes.

No power outages have occurred, but occasionally the NAS will shut itself down. I've figured out why.

The UPS reports minor power outages (such as a spike when the printer warms up) like this:
16:15:18 Power loss detected.
16:15:24 Power has returned.

The NAS shut itself down this morning. This is what the log says:
11:07:41 Power has returned.
11:07:42 Power loss detected.

That's right! The message cancelling the shutdown arrives one second before the shutdown message. The NAS dutifully cancels a non-existent shutdown, then goes right ahead and starts its shutdown timer.

This is really dumb. My Mac can read the UPS battery status (allowing behavior like “shut down when UPS battery level is critical”) and the power status, rather than relying on this erroneous transition model. Why can't my Linux-based NAS?

Posted at 2008-03-23 11:34:32 by RichardLink to UPS annoyances
Comments, trackbacks.

Building sqlite3 from MacPorts

Getting this error?
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.7" && gnumake all " returned error 2
Command output: sort -n -b -k 3 opcodes.h | -f ./mkopcodec.awk >opcodes.c
/bin/sh: -f: command not found
gnumake: *** [opcodes.c] Error 127

Do this:
export NAWK=/opt/local/bin/gawk
sudo port clean sqlite3
sudo port install sqlite3

The Makefile isn't looking in the right place for awk. The Macports trac page thinks this problem doesn't still exist… I'm not so sure!

Posted at 2008-03-23 00:43:20 by RichardLink to Building sqlite3 f…
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: