[CONTROLLER-1526] "karaf" script invokes /bin/sh but requires /bin/bash functions Created: 08/Jun/16 Updated: 03/May/18 Resolved: 01/Aug/16 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | karaf |
| Affects Version/s: | Beryllium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Alexis de Talhouët | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6030 |
| Description |
|
The bin/mvn script uses the "local" command which is a shell builtin of bash and similar shells, but is not required for POSIX-compliance in sh. When I attempt to run karaf on a Solaris system, I see the following output: root@solaris:/opendaylight/bin# ./karaf Lines 172, 182 and 183 invoke "local" to make local variables to the function. According to "man bash", this is a shell builtin. However, bin/karaf is invoked as: #!/bin/sh On most flavors of linux, this resolves to bash or dash which probably runs in a restricted environment after checking to see that its $0 is sh. But on Solaris's /bin/sh is actually ksh93 for backwards compatibility. Since "local" is not part of a POSIX-compliant /bin/sh, depending on it in a script that is invoked with /bin/sh is a bug. (this explain is borrowed from https://issues.apache.org/jira/browse/MNG-5852) |
| Comments |
| Comment by Alexis de Talhouët [ 08/Jun/16 ] |
|
> The bin/mvn script |
| Comment by Alexis de Talhouët [ 10/Jun/16 ] |
| Comment by Alexis de Talhouët [ 01/Aug/16 ] |
|
beryllium --> https://git.opendaylight.org/gerrit/#/c/42645/ |