karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-6254) Karaf shell scripts don't work on Solaris 10
Date Sun, 05 May 2019 11:47:01 GMT

    [ https://issues.apache.org/jira/browse/KARAF-6254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833341#comment-16833341
] 

ASF GitHub Bot commented on KARAF-6254:
---------------------------------------

jbonofre commented on pull request #820: [KARAF-6254] Use backticks for command substitution
URL: https://github.com/apache/karaf/pull/820
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Karaf shell scripts don't work on Solaris 10
> --------------------------------------------
>
>                 Key: KARAF-6254
>                 URL: https://issues.apache.org/jira/browse/KARAF-6254
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.5
>         Environment: Solaris 10 x86-64 using default shell
>            Reporter: Baptiste DA ROIT
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.3.0, 4.2.6
>
>
> Trying to launch Karaf from default shell (which, from what I uderstand, is Bourne Shell)
on a Solaris 10 platform results in the following error:
> {code:sh}
> # ./karaf
> ./karaf: erreur de syntaxe ligne 30: `READLINK_EXISTS=$' inattendue\{code}
> {code}
> On an other hand, running Karaf shell scripts using another shell (as ksh) works fine:
> {code:sh}
> # ksh karaf
> {code}
> The following shell scripts are impacted: client, inc, shell, start, status, stop
> {code:sh}
> # ./client
> ./client: erreur de syntaxe ligne 30: `READLINK_EXISTS=$' inattendue
> # ./inc
> ./inc: erreur de syntaxe ligne 77: `MAX_FD_LIMIT=$' inattendue
> # ./shell
> ./shell: erreur de syntaxe ligne 30: `READLINK_EXISTS=$' inattendue
> # ./start
> ./start: erreur de syntaxe ligne 30: `READLINK_EXISTS=$' inattendue
> # ./status
> ./status: erreur de syntaxe ligne 30: `READLINK_EXISTS=$' inattendue
> # ./stop
> ./stop: erreur de syntaxe ligne 30: `READLINK_EXISTS=$' inattendue
> {code}
> This is because these shell scripts uses the *$()* syntax for command substitution, which
is not compatible with some very oldest of non-POSIX-compatible bourne-shells (such as the
default Shell of Solaris 10).
> To enhance the portability of these scripts, an alternative would be to use the legacy
command substitution syntax *`...`*. Indeed, while the *$()* syntax is recommended as the
way to go (mainly because it makes nesting command substitutions easier and allows better
readibility), the backtick one is still valid, even providing better portability.
>  
> Source: [Why is {{$(...)}} preferred over {{`...`}} (backticks)?|http://mywiki.wooledge.org/BashFAQ/082]
at BashFAQ
> (!) Note that this issue can probably be linked to [KARAF-5190|https://issues.apache.org/jira/browse/KARAF-5190].
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message