On Wed, 2022-11-23 at 10:03 +0000, Klemens Nanni wrote:
> On Wed, Nov 23, 2022 at 10:48:22AM +0100, Martijn van Duren wrote:
> > On Wed, 2022-11-23 at 09:25 +0000, Klemens Nanni wrote:
> > > On Wed, Nov 23, 2022 at 10:15:20AM +0100, Martijn van Duren wrote:
> > > > Here's an attempt to remove sed from netstart.
> > > 
> > > I don't see the point in this.
> > 
> > On Mon, 2022-11-21 at 20:42 -0700, Theo de Raadt wrote:
> > > Oh, except that using grep, head, or awk.  That breaks NFS diskless
> > > machines, because they are in /usr, which may not be mounted yet.
> > > 
> > > So this has to be done using shell features or commands in /bin and /sbin.
> > > You will see these interesting hacks in other parts of rc and netstart.
> > > 
> > > 
> > 
> > https://marc.info/?l=openbsd-misc&m=166908823920806&w=2
> 
> Ah, NFS /usr.
> 
> Instead of rolling our own shell functions, maybe this is a good reason
> to implement ${parameter/pattern/string} in ksh(1)?
> 
> This should make shell scripting in base a lot easier where awk/sed is
> not available;  the installer could probably use this as well.
> 
> At least Bash has this (and other pattern substitution) syntax.
> 
Maybe... I'm not a big fan of feature-bloat in the shell and this
function is small enough, so personally I see no reason. But if you
write it and no one else objects why not...

Reply via email to