Subject: Re: /etc/rc with #!/bin/sh ?
To: Erik E. Fair <fair@clock.org>
From: Dave Sainty <dave@dtsp.co.nz>
List: current-users
Date: 07/02/1999 01:12:35
"Erik E. Fair" writes:

> At 21:24 -0700 6/30/99, Andrew Brown wrote:
> >>>Also, /sbin/init (I keep wanting to type /etc/init -- don'tcha just love
> >>>legacy systems?) explicitly calls
> >>>	execv(_PATH_BSHELL, ("sh", "/etc/rc", autoboot? "autoboot": 0, 0));
> >>
> >>Actually, this is an anachronism given that execve(2) deals with the #!
> >>magic number. I'd argue that init should simply execv("/etc/rc") without
> >>reference to "sh" - that way, if someone ever wants to change the script to
> >>something else, they can.
> >
> >ooooooh!  you're pure evil, aren't you?  ;-)
> >
> >ps - i link perl statically and stick in /sbin.
> 
> Well, if you *really* wanted to save disk space, there's no reason why you
> couldn't reimplement most of /bin as perl scripts...

...and if libperl was linked into the kernel the scripts could be
executed without any context switches, so they'd be efficient too!