You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Christian Brüssow (JIRA)" <ji...@apache.org> on 2017/06/09 09:43:18 UTC
[jira] [Created] (KARAF-5190) start.sh fails in realpath function
under Solaris 10
Christian Brüssow created KARAF-5190:
----------------------------------------
Summary: start.sh fails in realpath function under Solaris 10
Key: KARAF-5190
URL: https://issues.apache.org/jira/browse/KARAF-5190
Project: Karaf
Issue Type: Bug
Affects Versions: 4.0.9
Environment: SunOS 5.10 (aka Solaris 10) SPARC, awk from /usr/bin
Reporter: Christian Brüssow
Trying to start Apache Karaf 4.0.9 under Solaris 10 (SPARC) the start-script exits with a syntax error:
/opt/test/karaf/bin/start: syntax error at line 22: `LINK=$' unexpected
I have investigated this and found, the script relies on a feature the standard awk for this plattform does not support - at least on our machine. The -F"-> " paramter will only use the dash "-" as the field separator. When using the XPG4 version of awk the script works.
Examples on the command line:
With XPG4 awk:
$ ls -l "$(basename ".bashrc")" | /usr/xpg4/bin/awk -F"-> " '{print $2}'
$
Empty output, which is fine as the file used is no link.
With the standard awk:
$ ls -l "$(basename ".bashrc")" | /usr/bin/awk -F"-> " '{print $2}'
rw
$
The "rw" is returned, because only the "-" is used as a seperator to split "ls -l" .bashrc, which looks like "-rw-r--r-- 1 devel other 392 Jun 30 2015 .bashrc" in this case.
Sadly, under Solaris, one should not presume the awk in the PATH is a GNU or nawk. Some adminstrator will also not include the XPG4 "bin"-directory at the beginning of the PATH. So the script itfself must handle this.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)