Lars Marowsky-Bree wrote:
> On 2007-04-18T10:28:06, Dejan Muhamedagic <[EMAIL PROTECTED]> wrote:
>
>>>> declare -a procs
>> Does /bin/sh support arrays? I think that so far all resource
>> agents were supported by the most common denominator which is
>> Bourne shell.
>
> It doesn't matter. eDirectory will only be available on systems which
> also have bash installed.
>
>>>> if [ -z $(ps -p ${procs[0]} -o pid=) ] ; then
>>> kill -0 on the pid is a lot simpler.
>> Right. BTW, did you know that 'kill -0' returns success in case
>> the process is a zombie? That's where 'kill' method differs from
>> 'ps | grep'.
>
> ps also picks up zombies, the pattern has to be more specific.
>
> In this case, this would be desirable - ndsd must be gone, not a zombie
> ;-)
If the script requires bash (and it does), then it should NOT say
#!/bin/sh at the beginning, but #!/bin/bash instead.
I don't particularly like bash-isms, but if you only intend on running
it on Linux, you should be OK -- unless you put #!/bin/sh.
I think some distros allows the users to change /bin/sh to whatever they
want.
--
Alan Robertson <[EMAIL PROTECTED]>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/