Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-5842

activemq script doesn't work on solaris because of "su" command

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 5.11.1
    • Fix Version/s: None
    • Component/s: Broker
    • Environment:

      Solaris 11.1 (SPARC)
      Activemq 5.11.1 installed from tar.gz

      Description

      I installed activemq from archive and wished to run the broker using a specific user but I was having a problem with the "su" command lines 134 : su -c "mkdir $ACTIVEMQ_DATA" - $ACTIVEMQ_USER; and 294/295 : su -s /bin/sh -c "..." - $ACTIVEMQ_USER

      Actually, the "su" command is used to "Switch User" whereas the intended task here is to execute a commad as another user. In my opinion, the "need" and the "command goal" don't match. Moreover, the "sudo" command matches better : Switch User DO. And on my platform, the "su" command doesn't support the -c parameter and only permits to change the current user before typing other commands.

      So I would use the "sudo" command like that :

      • line 134 : sudo -u $ACTIVEMQ_USER mkdir $ACTIVEMQ_DATA
      • line 294 : DOIT_PREFIX="sudo -u $ACTIVEMQ_USER /bin/sh -c "
        And I would also remove the DOIT_POSTFIX variable :
      • to leave the 295th line empty
      • to adjust lines 310, 323 and 333 without $DOIT_POSTFIX

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              Miminoux Thomas RICOU
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

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