On Thu, 14 Apr 2011, matteo filippetto wrote:

> >>
> >> so the problem is that tomcat.rc can't find javaPathHelper when
> >> starting from rc.local with sudo.
> >>
> >> So I modified /etc/tomcat/tomcat.rc and atteched a diff.
> >
> > You should use "${LOCALBASE}" instead of /usr/local
> >
> > ciao,
> > David
> >
> 
> sorry David,
> I didn't understand your answer :-(
> 
> Could you explain ?

I mean: you cannot hard-code /usr/local path.

Instead, use:

JAVA_HOME=$(%%LOCAL_BASE%%/bin/javaPathHelper -h tomcat)

And then, in the port's Makefile, modify the do-install target
accordingly:

        @sed -e 's,%%PREFIX%%,${TRUEPREFIX},' \
                -e 's,%%CATALINA_BASE%%,${CATALINA_BASE},' \
                -e 's,%%LOCAL_BASE%%,${LOCALBASE},' \
                < ${FILESDIR}/tomcat.rc > ${SAMPLEDIR}/tomcat.rc

Cheers, 
David

Reply via email to