LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[OT] Re: Problem with /etc/ha.d/resource.d/apache script

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [OT] Re: Problem with /etc/ha.d/resource.d/apache script
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Tue, 28 Sep 2004 12:55:42 +0200
Hi,

I have having problems with the apache script after installing on Slackware 9.1
I haven't used slackware in 10 years, glad to see they're still alive 
and kicking ;).
if
  [ ! -f "$CONFIGFILE" -a "X$COMMAND" -eq Xstop ]    <------- PROBLEMS OCCUR 
HERE
then
  echo "$CONFIGFILE not found - apache considered stopped"
  exit 0
fi
This is acid for the eyes. Please contact the responsible slackware 
maintainer for this subsystem and get him to fix it. It's not a job of 
the LVS community. If it's part of the linux-HA sub system, send this 
fix to them.
WHY??? Easy fix.  -eq is for NUMERIC comparision so change the line to the 
following:

[ ! -f "$CONFIGFILE" -a "X$COMMAND" = "Xstop" ] Then you will have no errors in your logs......
Most definitely. However, that doesn't change the fact that this script 
is really badly engineered (two completely orthogonal semantics in one 
check). Even though it's only a scripting language general rules of 
software design apply.
Please all maintainers of sub systems in your distro, work together to 
get a unified runlevel concept with clean start/stop scripts. And for 
heaven's sake, buy a book on shell scripting or read the following 
must-read starter documentation:
http://www.tldp.org/LDP/abs/html/

Cheers,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
<Prev in Thread] Current Thread [Next in Thread>