Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1215

Shell scripts are incompatible with /bin/sh on Solaris

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.5, 3.0.0
    • 2.2.6, 3.0.0
    • None
    • None
    • SunOS

    Description

      The most restricted sh implmentation must be taken into account for all scripts.
      At the moment, "#!/bin/sh" is specified in shell file headers, but more advanced bash syntax/features are used in the code.
      For example in stop script:

      export KARAF_SCRIPT="stop"
      if [ -e "$DIRNAME/setenv" ]; then
        . "$DIRNAME/setenv"
      fi
      

      should be changed to:

      KARAF_SCRIPT="stop"; export KARAF_SCRIPT
      if [ -f "$DIRNAME/setenv" ]; then
        . "$DIRNAME/setenv"
      fi
      

      that would work both, on bin/sh and /bin/bash
      The same for admin, client, karaf, start scripts

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jbonofre Jean-Baptiste Onofré
            ilazebny Igor Lazebny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment