On Thu, Sep 6, 2012 at 8:14 AM, Alejandro Abdelnur <t...@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.