Vendor support for Linux gets better everyday but sometimes they miss the point. I'm happier they do a somewhat sloppy job than not do it at all but there is room for improvement.
Case in point: APC's Powerchute Network Shutdown for Linux 2.2.1. For a daemon whose only job is listening for a "power will be out soon" notice and shutting down the machine, this implementation based on Java is a resource hog.
Many admins will try to install the application via remote console and puzzle at the enigmatic error message:
$ sudo ./pcns221lnx.binThe log file doesn't help in figuring out that you need X to install the application. On Debian, install the xbase-clients packages and its dependencies; do the same for package sun-java5-jre (it's in the non-free group) if you still haven't done so.
Searching for JVM...
Starting the wizard...
Exception in main class "JExpressLoader"
See errors.log for other possible causes.out of disk space?
The installer also assumes a RedHat SysV structure (with /etc/rc.d/...). Create this directory if it doesn't exist or you will not have the init script after the install is finished. After a successful installation move the created scripts and links to the correct location on your system.
On a few of my installations, the powerchute.sh script (in /usr/local/bin/PowerChute) was broken; it seemed that some variables weren't substituted by the installer. The correct one looks like this:
INSTALL_PATH="/usr/local/bin/PowerChute"Last but not least, if you are installing over SSH, make sure your X11 connections are forwarded. The option X11Forward option must be set to "yes" in the server's /etc/ssh/sshd_config. Also, use "-X" when calling ssh, to enable forwarding on the client side (or muck around with your options in ~/.ssh/).
#fixes developer.java.sun.com bug id #4059472 -java.net.SocketException: too many files open
ulimit -n 256
nohup /usr/lib/jvm/java-1.5.0-sun-188.8.131.52/jre/bin/java -Xrs -cp \
./comp/shutdownerlets/OSshutdownerlet.jar: com.apcc.m11.arch.application.Application \
1>/dev/null 2>/dev/null &
echo $PROCESSID > pcns.pid