On Mon, Jun 16, 2008 at 07:59:50AM -0400, James Carlson wrote:
> Ceri Davies writes:
> > 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".
> 
> It's "not a defect" because a reference to the S9 implementation of
> /sbin/rc2 showed that it did this:
> 
>     76          for f in /etc/rc2.d/S*; do
>     77                  if [ -s $f ]; then
>     78                          case $f in
>     79                                  *.sh)   .        $f ;;
>     80                                  *)      /sbin/sh $f start ;;
>     81                          esac
>     82                  fi
>     83          done
> 
> In other words, it simply has _never_ done what the user thought it
> would do.

But it did do one thing that lsvcrun does not: it sourced files ending
in .sh into the *same* shell process running /sbin/rc2.

Years ago (long before SMF) I saw a service that had an S*.sh file that
would set environment variables that automountd would then use.

lsvcrun always starts a new shell process, which breaks that feature of
S/K*.sh: such scripts now cannot affect the environment of subsequent
S/K*.sh scripts.

I'd think that /sbin/rc? should have been kept around, using svccfg(1M)
or a utility program to update SMF when each [KS]* script is run.

Nico
-- 

Reply via email to