On Mon, Jun 16, 2008 at 6:12 AM, Ceri Davies <ceri at submonkey.net> wrote:
> I've been bitten this morning by bug 6296119 "lsvcrun doesn't seem to
> honor #! interpreter specifications" which was closed as "Not a Defect"
> some time ago.  I'm about to beg to differ, although obviously I haven't
> seen why that was considered "not a defect".

If you follow the instructions[1], you do not have a reaonsable chance
of success.  That implies a bug in the documentation or the code.
Note that this[2] has not changed a whole lot since Solaris 7.
However it is nice to see that the implication in the Solaris 7
variant that S100 would run after S99 is removed.  *Now* I know why
I've seen junior admins doing that - they were following the manual!

1.http://docs.sun.com/app/docs/doc/819-2379/fahqr?l=en&a=view
2. http://docs.sun.com/app/docs/doc/805-3727/6j3ht4dg1?l=en&a=view

IMHO this behavior is one of those backwards things that Solaris has
always done that should be fixed if someone in the community is
willing to do it.  Sure - SMF is the way forward but it is overly
complicated for a new Solaris user to understand how to add a service.
 SMF has already broken the legacy *.sh behavior (not that I care), it
seems quite likely that /bin/sh will become ksh93, and no competitor
(except SCO, maybe) uses such a featureless Bourne shell.

In the past, scripts in /etc/rc*.d did not need to be executable to
work.  The suggested workaround is to use the existing behavior IFF
the file is not executable.  Otherwise, simply run the program and let
the OS determine if it is a bourne shell script, perl script, or ELF
executable.  If someone added a shell script without the shebang, I'm
pretty sure the interpreter will default to /bin/sh so that should not
be a worry.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/

Reply via email to