incubator-bigtop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Shaposhnik <...@apache.org>
Subject Re: running init.d scripts by hand vs. service(8)
Date Thu, 06 Sep 2012 16:11:21 GMT
On Thu, Sep 6, 2012 at 8:14 AM, Alejandro Abdelnur <tucu@cloudera.com> wrote:
> I think is a desirable feature to be able to modify ENV then run start
> the daemon directly. It may be handy on troubleshooting.

As I said -- it is entirely possible we can all agree that this is a feature.

> I'd propose a modification to Cos' proposal, print a NICE BIG WARN
> when starting the daemons without service(8) stating 'current ENV
> settings may affect the daemon (Roman remember that)'

I don't think I have a guaranteed way of detecting one vs. the other.
/usr/bin/service happens to be a shell script that at the end of the
day simply scrubs the environment and execs the actual init.d script:
    exec env -i LANG="$LANG" PATH="$PATH" TERM="$TERM"
"$SERVICEDIR/$SERVICE" ${ACTION} ${OPTIONS}

Perhaps we can try to detect that we're NOT exec'ed by service via
absence of things like HOME, etc.

The question then becomes whether this is too much trouble and whether
it'll make our scripts too verbose.

Thanks,
Roman.

Mime
View raw message