Karaf
  1. Karaf
  2. KARAF-1215

Shell scripts are incompatible with /bin/sh on Solaris

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5, 3.0.0
    • Fix Version/s: 2.2.6, 3.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      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

        Activity

        Igor Lazebny created issue -
        Igor Lazebny made changes -
        Field Original Value New Value
        Attachment scripts-patch.zip [ 12515471 ]
        Ioannis Canellos made changes -
        Assignee Ioannis Canellos [ iocanel ]
        Jean-Baptiste Onofré made changes -
        Assignee Ioannis Canellos [ iocanel ] Jean-Baptiste Onofré [ jbonofre ]
        Jean-Baptiste Onofré made changes -
        Fix Version/s 2.2.6 [ 12319142 ]
        Fix Version/s 3.0.0 [ 12316040 ]
        Jean-Baptiste Onofré made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jean-Baptiste Onofré made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Jean-Baptiste Onofré made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jamie goodyear made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Igor Lazebny
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development