[Openmcl-devel] CCL startup script (ccl & ccl64) is not Bourne Shell compatible
R. Matthew Emerson
rme at clozure.com
Mon Oct 12 23:07:19 PDT 2009
These scripts are certainly not the only (or even necessarily the
best) way to start ccl. They may be a little too clever for their own
good.
It is perfectly fine to customize them for your own installation.
If you put CCL_DEFAULT_DIRECTORY=/path/to/your/ccl at the top of the
script, there would be nothing wrong with deleting all the code that
tries to detect where your ccl directory is.
On my systems, I have several variants of the script installed in /usr/
local/bin as ccl-1.3, ccl64-1.3, ccl, ccl64, etc.
On Oct 10, 2009, at 12:45 PM, Waldek Hebisch wrote:
> Chun Tian wrote:
>> Hi, Clozure team
>>
>> CCL's startup script (ccl & ccl64) cannot run correctly under Solaris
>> 10, because this two scripts is NOT Bourne Shell compatible and have
>> #!/bin/sh as their first line. The problem is in following lines:
>>
>> if [ -z "$CCL_DEFAULT_DIRECTORY" -a -n "`which readlink`" ]; then
>> dir="`readlink $0`"
>> probe "${dir%/scripts/ccl64}"
>> fi
>>
>> Here, the syntax "${dir%/scripts/ccl64}" is only support in GNU bash
>> (Bourne Again Shell) but original "sh". Today, almost every OS have
>> "/
>> bin/sh" link to "/bin/bash" so that most users didn't notice this
>> issue. But Solaris 10 still use the original "/bin/sh" which lack of
>> support of that usage on shell variables.
>>
>
> The last paragraph is misleading: the "${dir%/scripts/ccl64}"
> construct
> is in Posix shell specifiaction. It works on most Unix systems
> simply because vensors ship standard compilant shells. Solaris
> ships pre-standard Bourne shell, so it does not work. Advice to
> require 'bash' goes in wrong direction -- several systems have
> different shell as '/bin/sh' and do not ship bash in default
> setup. So using 'bash' is likely to break several other systems.
>
> AFAICS on Solaris correct fix is to replace '/bin/sh' by
> '/bin/posix/sh'.
More information about the Openmcl-devel
mailing list