On Fri, Feb 12, 2010 at 1:39 PM, Stas Oskin <stas.os...@gmail.com> wrote:
> Hi.
>
>
>> RHEL doesn't, the  daemon scripts for SmartFrog have to look for both RHEL
>> and lsb; lsb is what you get on SuSE though.
>>
>>
> Actually LSB is what I'm looking to distance from - too much dependencies
> required for it on the RedHat for example.
>
> I'm looking for a solution that won't rely much on external OS dependencies,
> and will be basically self-sufficient.
>
> Any ideas, other then a pure bash scripting?
>
> Regards.
>

Stas,

The problem is only as simple or as hard as you want to make it. LSB
defines subs and return codes

http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

RH scripts source /etc/rc.d/init.d/functions, but you don't have to do that.

You said "pure bash", that is almost an oxymoron. You can not even
truly count on pidof, which, or /proc on all systems. Also the default
shell could be csh or sh.

Status is always the most interesting function, do you parse ps -ef,
do you write a pid file, do you nc to a port?

Personally, I would not lose sleep over shell scripts. After all the
fun part should be using hadoop, not starting it up.

Reply via email to