tomcat startup script not working at boot

Tapas Mishra mightydreams at gmail.com
Sat Feb 26 09:30:52 UTC 2011


On Sat, Feb 26, 2011 at 11:37 AM, Nils Kassube <kassube at gmx.net> wrote:
> Tapas Mishra wrote:
>> How do you decide when system is booting then whether
>> /etc/rc5.d/S20tapas-tomcat will execute first or
>> /etc/bash.bashrc will come first in boot sequence so that JAVA_HOME
>> or any other variable comes first.
>
> I think you are on the wrong thrack. If you execute your
> /etc/bash.bashrc script, the environment variables set by that script
> will not be used by other startup scripts because those other scripts
> are new independent jobs. If you want specific environment variables set
> in a specific script, you should set them in that very script.
>
> Then you refer to /etc/rc5.d/S20tapas-tomcat. Are you sure it will ever
> be used? The default runlevel for Ubuntu is 2, not 5. It would only work
> if you have a special setup which uses runlevel 5.
>
> I think you want to read "/usr/share/doc/sysv-rc/README.runlevels.gz".
I read the doc you mentioned
and excerpts from above doc

"3. Switching runlevels.

   When one switches from (for example) runlevel 2 to runlevel 3,
   /etc/init.d/rc will first execute in alphabetical order a"

So I read /etc/init.d/rc

and I see only following being set there

PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH

I thin up to here I understood correctly.
But here in this script
/etc/init.d/rc which is invovked when system moves from run level 2
(Default in Ubuntu as you said)
to run level 5 I do not see any where /etc/bash.basrc into picture and
the only thing set if I understood here correctly is
PATH and no other variable.
So how does it happen that when I a user logs in to run level 5 he is
able to get the environment variables in
/etc/bash.bashrc (if you leave my question for some time of my tomcat
script which is working)
I want to know in general how it happens that the variables defined in
$HOME/.basrch
or /etc/bash.bashrc gets initialized
1) at which run level and
2) what script (if some one can point) invokes them.




More information about the ubuntu-users mailing list