activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Issue in init script
Date Mon, 12 Mar 2012 11:11:50 GMT
Hi Larry,

can you raise a Jira for this, so it doesn't get lost in the emails.


Regards
-- 
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/



On Wed, Mar 7, 2012 at 1:55 PM, Larry Meadors <larry.meadors@gmail.com>wrote:

> I think I found a bug in the the bin/activemq script. It's simple to
> fix, and looks like someone was just trying to be too careful. :)
>
>
> When trying to determine the Active MQ installation dir, it does this:
>
> saveddir=`pwd`
>
> ...then later it does this:
>
> cd "$saveddir"
>
>
> In my case, I call the script from my home directory, and then when it
> tries to <import resource="jetty.xml"/>, it fails because there is no
> jetty.xml in my home directory.
>
> I changed the script to do this:
>
> #saveddir=`pwd`
> ...
> #cd "$saveddir"
>
> ...and now it works perfectly.
>
> That saveddir variable is actually not needed at all. When you call a
> script that has "#!/bin/sh" as the 1st line, it invokes a new shell,
> so after the script finishes, that shell is closed and you go back to
> the calling shell, and cd was never called there.
>
> Larry
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message