Re: install logging
Joey Hess <email@example.com> writes:
> Massimo Dal Zotto wrote:
> > I've not explained myself. I'm not speaking of starting the install
> > process from the /etc/init.d scripts, which would have the inconvenient
> > that you described.
> > Instead I'm proposing of using the initscript(5) optional script which,
> > if present, will be used to control the start of any process spawned by
> > init including the getty processes. My /etc/initscript looked like this:
> > #
> > # initscript Executed by init(8) for every program it
> > # wants to spawn like this:
> > #
> > # /bin/sh /etc/initscript <id> <level> <action> <process>
> > #
> > if [ "$1" = '1' -a -x /etc/install/install.sh ]; then
> > # If spawned with id '1' and /etc/install/install.sh exists run it
> > exec /etc/install/install.sh < /dev/tty$1 > /dev/tty$1 2>&1
> > else
> > # Anything else, execute the original program
> > eval exec "$4"
> > fi
> > The /etc/initscript normally doesn't exists. If the above initscript is
> > copied in /etc by the bootfloppy installer after reboot it will run the
> > install.sh script instead of getty, but only when handling the entry '1'
> > of the first VC.
> > If the script is deleted or renamed after the second stage of the
> > installation is finished a getty will be started on tty1 as usual.
> > While the install script is active on tty1 you still have the mgetty
> > on the other VC's because the iniscript will run the original process
> > if the init id is not '1'.
> Huh, that's pretty slick.
> If it's not too late to be making a change like this, I'd like to give
> it a shot for base-config. It would be nice to not have to keep
> inittab.install in synch with inittab, and should make base-config's job
> less error-prone.
> We'd have to make it catch the T0 and T1 id's too, for dumb
That's fine with me. As you say, we need to watch out for serial
console and the like. But something that can get rid of a gross hack
with a slick trick (and inittab.install is a gross hack) is fine by
.....Adam Di Carlo....firstname.lastname@example.org.....<URL:http://www.onshored.com/>