DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38761>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38761
Summary: error in .sh scripts: symbolic link resolution failure
for relative symlinks on the PATH
Product: Tomcat 5
Version: 5.5.14
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: adam@fortifysoftware.com
This problem occurs when you have a symbolic link to the tomcat scripts on your
PATH that links to the tomcat script using a relative path.
Steps to reproduce bug:
1. Go to some directory on your PATH. I'm using ~/bin which I've added to my PATH
2. Create a relative symlink to the tomcat statup script. I did: ln -s
../download/tmp/apache-tomcat-5.5.15/bin/catalina.sh start-tomcat
3. Run the symlink. It fails with the following message:
/home/adam/bin/start-tomcat: line 72: cd:
../download/tmp/apache-tomcat-5.5.15/bin/..: No such file or directory
Cannot find /home/adam/bin/setclasspath.sh
This file is needed to run this program
This can be fixed by changing the line:
if expr "$link" : '.*/.*' > /dev/null; then
to:
if expr "$link" : '/.*' > /dev/null; then
in all the .sh scripts. After changing it in catalina.sh, my relative symlink
works correctly. I've tested my fix using a chain of symlinks (both absolute and
relative) that finally resolve to catalina.sh and it seems to work fine.
One of my coworkers pointed out that this same error was in the Maven scripts,
and that they fixed it recently (looks like the same fix I suggested). I imagine
a lot of open source projects are sharing scripts and code, so if you agree that
this is the correct fix someone should check to see if other apache/jakarta
projects need their scripts updated.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
|