Tomcat init script does not test correctly for /etc/rc.d/init.d/functions

2018-03-26 Thread Casper Pedersen
Hi,

The init.d start up script which is being distributed by many, is having the 
following test:

# Source function library.
if [ -x /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi

That will not work correctly on RHEL as on RHEL this file is read only (not 
executable).

Was also discussed here: 
https://roosbertl.blogspot.com/2011/12/tomcat7-on-centos7-right-way.html?showComment=1366685221068#c9019320598583823471
 


The file might have been executable in earlier version but with RHEL 6 and 7 
this is no longer the case.


Thank you,

Casper

Re: Tomcat init script does not test correctly for /etc/rc.d/init.d/functions

2018-03-26 Thread Casper Pedersen
Hello,

> On 26. Mar 2018, at 4:41 PM, Coty Sutherland  wrote:
> This list (dev@tomcat) isn't the best place to get help with distro
> specific tomcat packages as the tomcat community is upstream from
> those distributions. For future reference, please file a bug in the
> tracker used by the offending distribution. More to the problem, which
> distributions are you referring to? The only place sysv is still used
> is in rhel-6, which now uses /lib/lsb/init-functions.

True, so the startup script should be using that instead of 
/etc/rc.d/init.d/functions.

> 
>> Was also discussed here: 
>> https://roosbertl.blogspot.com/2011/12/tomcat7-on-centos7-right-way.html?showComment=1366685221068#c9019320598583823471
>>  
>> 
> 
> That article is from 2011, and (after a quick glance) provides
> instructions on how to create your own init script :)

The last response to that blog post points the following out:

— snip —

This matters because RHEL6 and CENTOS6 seem to have that file without the 
execute bit set

— snip ---

I’ll open a downstream bug, thank you.

Casper