Mailing List Archive

Another Bug with ldirecrtord?
Hi all,

I've just discovered another bug with ldirectord, this time with the start
script, which has the following:

case "$1" in
start)
echo "Starting ldirectord" && /sbin/ldirectord ldirectord.cf start
;;
stop)
echo "Stoping ldirectord" && /sbin/ldirectord ldirectord.cf stop
;;
restart)
$0 stop
$0 start
;;
status)
/sbin/ldirectord ldirectord.cf status
;;
*)
echo "Usage: ipv4_conf {start|stop|restart|status}"
exit 1
esac


The big problem with this is that when called from heartbeat, it gets called
as:
/etc/ha.d/resource.d/ldirectord <conf> start

$1 in this case is the name of the cofig file you want ldirectord to use.
The case statement only accounts for the commands [start|stop|restart|status].
This script needs to be checking $2, not $1, and arguably needs to be checking
$1 to make sure it exists as well.
--

Seeya,
Paul
----
It may look like I'm just sitting here doing nothing,
but I'm really actively waiting for all my problems to go away.

If you're not having fun, you're not doing it right!