Subject: Re: Solaris and rc.d scripts
To: Jonathan Perkin <>
From: grant beattie <>
List: tech-pkg
Date: 03/03/2005 08:02:23
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 02, 2005 at 07:47:37PM +0000, Jonathan Perkin wrote:

> > Now, during a boot, _something_ looks into /etc/rc.d and sources the
> > scripts into either /sbin/sh or /usr/bin/sh:
> >=20
> > [...]
> >
> > Recursively grep(1)ing /etc for any combination of rc.d returns
> > nothing substantial. There is definitely nothing in '/etc/rc?.d'.
> It's /sbin/rc2.  Code snippet not pasted due to copyright, but search
> for 'rc.d'.

the PR mentions that there seems to be a trend of `...` -> $(...) -
though I have no evidence to suggest this is the case, if it is indeed
true, we must curb this trend ASAP.

a recent thread highlighted the fact that we must write for the lowest
common denominator, and there's no telling what platforms pkgsrc might
be ported to in the future.

(the discussion was about GREP on Solaris, iirc, where xpg4's grep
silently truncates long lines, but /usr/bin/grep doesn't support -q.
the lowest common denominator there is 'grep ... >/dev/null 2>&1',
which is what all portable sh(1) scripts use.)

I will make sure all of the above, and more, gets into to the
portability section of the guide, so there are no excuses for this to
happen in the future :-)


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (NetBSD)