>On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> >No it is not. You're wrong. Put /usr/bin/ksh into a SMF script and it
>> >will not be executed.
>>
>> Have you actually tried this?
>
>Yes. It will not work.

I just tried it and it works just fine as I expected.

The source code also strongly suggests it does.  (The fact that it
calls "sh -c" does not mean that the script starting with #!/bin/ksh
will be fed to the shell; it will use /bin/ksh instead)

>> Those are, as before, strictly fed to /bin/sh
>
>Why? Why can't you use /usr/bin/ksh or /usr/xpg4/bin/sh as interpreter
>for all the scripts.

It's for backward compatibility reasons so it works in the most
compatible way.

It's trivial to write a script which behaves differently under /bin/sh
than under /bin/ksh.

Also, these scripts are not really important for old development;
if you develop on /etc/init.d script so you can sure code between older
releases and S10+, you will need to use /bin/sh anyway.  Using xpg4 sh
will not help you to attain portability.

>I am talking about SMF scripts and /etc/init.d scripts.

True for the latter, not for the former.

>>
>> >No, I blame Solaris for not honoring the POSIX standard.
>>
>> It does confirm to POSIX;
>
>Is there any certification?

Yes.

>> it's just that you don't undersand the
>> finesses of POSIX (and the freedoms)
>>
>> (POSIX says there needs to be a POSIX shell; not where it is)
>
>Is there any other operating system which uses this finesses/freedom
>as justification to make /bin/sh a standard-violating shell?

A program which is not referenced by the standard cannot be a standard
violating program.

Casper
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to