incubator-bigtop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Shaposhnik <>
Subject Re: running init.d scripts by hand vs. service(8)
Date Fri, 14 Sep 2012 23:46:22 GMT
On Tue, Sep 11, 2012 at 11:35 PM, Bruno Mahé <> wrote:
> su?
> Although I haven't had time to play with this issue.

It is not a straight su, it is a little bit more complicated since you
actually have to setup those env. vars that are part of /etc/default/foo

Thus it ends being something really ugly like:

env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" bash -c    \
     "[ -e /etc/default/foo ] && . /etc/default/foo
      exec $AGENT_SCRIPT $AGENT_ARGS > $AGENT_OUT 2>&1" &

and even then it is not a mechanical change. Since all of the init.d
scripts need to be audited for export FOO statements.

Actually, the more I think about it the more it feels like we might
benefit from templatizing all of our init.d related code and then
fixing this. I would like templatizing to be one of the features
for the Bigtop 0.5.0 releases, but perhaps for now we can just
keep in mind to always invoke service.


View raw message