Re: [dev] anyone played with mkinit?

From: Ethan Grammatikidis <eekee57_AT_fastmail.fm>
Date: Mon, 15 Nov 2010 14:14:43 +0000

On Fri, 12 Nov 2010 08:10 +0000, "Andy Spencer" <andy753421_AT_gmail.com>
wrote:
> On 2010-11-07 19:57, Uriel wrote:
> > On Sat, Nov 6, 2010 at 4:50 AM, Jens Staal <staal1978_AT_gmail.com> wrote:
> > > http://9fans.net/archive/2009/10/375
> > >
> > > https://lug.rose-hulman.edu/svn/misc/trunk/mkinit/
> > >
> > > apparently still with bashisms due to issues with rc (does not mention
> > > which) but seems cool and perhaps something for sta.li?
> >
> > Any issues with rc are no excuse for bashisms, actually there is never
> > any excuse for bashisms, /bin/sh should be more than enough.
> >
> > Also the use of svn is a bad omen.
>
> The two main issues that I remember with rc were:
> - Rc left zombies laying around, sh/bash reaps them

Years ago bash used to leave zombies around. Maybe reaping could be
added to rc.

> - I couldn't figure out how to correctly re-exec rc on /dev/console in
> order to get job control working.

p9p/9base rc doesn't do job control that I know of. Are you using
Byron's rc, or do you mean if a user subsequently runs bash job control
won't work?

>
> It'd be great if someone knows how to fix theses :)
>
> As for bashsims, there are a few, I figured if I was going to have to
> use sh instead of rc, I might as well go with bash.
> - Use "$@" and the like because sh doesn't support lists like rc.

Not a bashism.

> - The getopt/eval/read commands may be bash-specific.

Not a bashism.

> - Use the `history' command since the console doesn't have mouse

Out of bash, dash, and busybox ash only bash as the history command
itself, but I don't quite get why it's wanted. In 14 years of bash use
I've used the command maybe 3 or 4 times, and then it was to grep for
some complex command I should probably have typed into a text editor
first. I can understand wanting history for interactive shells but
busybox ash provides that, (I can't speak for dash,) it just doesn't
provide the history builtin. I also can't see the point of history in
the init system. ;)

> support for copy-paste by default.

May be a fair reason to go with bash. busybox ash lacks it, but if my
perspective is worth anything, that hasn't annoyed me to the point of
stopping what I'm doing when hacking on my PDA.

> - Uses readline (via read -ep) for line editing.

I think busybox ash supports this. I imagine any shell which supports
editing of its own command line would support the same in read.

>
> As for svn, it's not my favorite either, but at the time it was easier
> to just add it to an existing repo, which happened be using svn.
>
>
Received on Mon Nov 15 2010 - 15:14:43 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 15 2010 - 15:24:03 CET