Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 174498

Summary: tomcat init script is not POSIX compliant
Product: Gentoo Linux Reporter: Craig Andrews <candrews>
Component: [OLD] baselayoutAssignee: William L. Thomson Jr. (RETIRED) <wltjr>
Status: RESOLVED FIXED    
Severity: normal CC: base-system, flameeyes, hollow
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: tomcat 6 init script patch for Baselayout 2
tomcat 6 init script patch for Baselayout 2 [revised]
tomcat 5.5 init script patch for Baselayout 2

Description Craig Andrews gentoo-dev 2007-04-13 18:17:27 UTC
Using sys-apps/baselayout-2.0.0_alpha1, when I start or stop any service, I get this error:
/etc/init.d/tomcat-6: line 48: `start-helper': not a valid identifier

I'm using www-servers/tomcat-6.0.10-r2

I hope I'm assigning this bug to the right people - I wasn't sure if I should assign to baselayout or ebuilds.

Thanks!
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-04-13 18:27:46 UTC
- is not valid in POSIX shell function names.
Comment 2 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-04-13 20:57:01 UTC
I will address closer to the time of baselayout-2 being unmasked. And/or when I have a need to do a revision bump for other reasons.
Comment 3 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-04-19 16:36:01 UTC
Fixed in tomcat-6.0.10-r3, can't address 5.5.23 since it's stable, although the change is minor and quite moot. Will address that one when baselayout-2 is stabilized or etc.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-05 13:22:07 UTC
Created attachment 118235 [details]
tomcat 6 init script patch for Baselayout 2

Unfortunately that change is not enough to get tomcat 6 to work with Baselayout2 on Gentoo/FreeBSD.

The attached patch also changes [[ in [ and == in =, so that it works with BSD's sh (and probably dash).

It also adds a --name java instead of --quiet, otherwise the stop action will silently fail, and report a success.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-05 13:25:50 UTC
Created attachment 118236 [details, diff]
tomcat 6 init script patch for Baselayout 2 [revised]

Actually, this patch is a bit better, it also changes the pidfile name to be tomcat-6.pid rather than just tomcat.pid, otherwise starting it together with tomcat-5.5 will fool up s-s-d.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-05-05 13:27:05 UTC
Created attachment 118237 [details]
tomcat 5.5 init script patch for Baselayout 2

Same patch for 5.5 with also the start-helper vs start_helper change.
Although 5 is stable, Baselayout 2 is the only one usable on Gentoo/FreeBSD, so to have Tomcat 5.5 on it, this is needed.
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2007-05-05 13:42:34 UTC
(In reply to comment #4)
> 
> Unfortunately that change is not enough to get tomcat 6 to work with
> Baselayout2 on Gentoo/FreeBSD.
> 

Reopening.
Comment 8 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-05-15 04:50:42 UTC
Ok, address remaining non-posix compliant issue. We should be good to go now :)

Closing bug as it should be fixed now. Please comment or re-open if problem remains.
Comment 9 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-05-29 13:29:56 UTC
*** Bug 180207 has been marked as a duplicate of this bug. ***