ActiveMQ
  1. ActiveMQ
  2. AMQ-3762

Using bin/activemq init script uses current directory for resolving paths

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.1
    • Fix Version/s: None
    • Component/s: Broker
    • Labels:
      None
    • Environment:

      Linux 3.0.0-14-virtual #23-Ubuntu SMP Mon Nov 21 21:09:11 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

      Description

      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.

        Activity

        Hide
        Claus Ibsen added a comment -

        Larry a patch is welcome.

        Mind the script is intended for working on many *nix and linux flavors, so what works on ubuntu may cause problem for aix people.

        Show
        Claus Ibsen added a comment - Larry a patch is welcome. Mind the script is intended for working on many *nix and linux flavors, so what works on ubuntu may cause problem for aix people.

          People

          • Assignee:
            Unassigned
            Reporter:
            Larry Meadors
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development