You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (Resolved JIRA)" <ji...@apache.org> on 2012/04/03 08:56:29 UTC

[jira] [Resolved] (KARAF-1215) Shell scripts are incompatible with /bin/sh on Solaris

     [ https://issues.apache.org/jira/browse/KARAF-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved KARAF-1215.
-----------------------------------------

    Resolution: Fixed
    
> Shell scripts are incompatible with /bin/sh on Solaris
> ------------------------------------------------------
>
>                 Key: KARAF-1215
>                 URL: https://issues.apache.org/jira/browse/KARAF-1215
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.2.5, 3.0.0
>         Environment: SunOS
>            Reporter: Igor Lazebny
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 2.2.6, 3.0.0
>
>         Attachments: scripts-patch.zip
>
>
> 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:
> {code}
> export KARAF_SCRIPT="stop"
> if [ -e "$DIRNAME/setenv" ]; then
>   . "$DIRNAME/setenv"
> fi
> {code}
> should be changed to:
> {code}
> KARAF_SCRIPT="stop"; export KARAF_SCRIPT
> if [ -f "$DIRNAME/setenv" ]; then
>   . "$DIRNAME/setenv"
> fi
> {code}
> that would work both, on bin/sh and /bin/bash
> The same for admin, client, karaf, start scripts

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira