Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 15934 invoked from network); 23 Feb 2006 03:42:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Feb 2006 03:42:24 -0000 Received: (qmail 69963 invoked by uid 500); 23 Feb 2006 03:42:19 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 69923 invoked by uid 500); 23 Feb 2006 03:42:18 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 69911 invoked by uid 500); 23 Feb 2006 03:42:18 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 69908 invoked by uid 99); 23 Feb 2006 03:42:18 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2006 19:42:15 -0800 Received: by ajax.apache.org (Postfix, from userid 99) id CEFC0DD; Thu, 23 Feb 2006 04:41:54 +0100 (CET) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 38761] New: - error in .sh scripts: symbolic link resolution failure for relative symlinks on the PATH Message-ID: X-Bugzilla-Reason: AssignedTo Date: Thu, 23 Feb 2006 04:41:54 +0100 (CET) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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