[Debsplash-devel] /etc/init.d/rc hooks for progressbars and others

Luis M Luis M <lemsx1@gmail.com>
Sun, 2 Jan 2005 08:02:04 -0500


Hello Miguel,

We have been working on a project called "debsplash" for some time.
Debsplash is a port of gentoo's gensplash, which is a better approach
to the ol' bootsplash schemes that we have seen for other distros
(SuSe, Fedora, etc). Gensplash's kernel patch, fbsplash, is actively
maintained and works very well -- unlike bootsplash and others.
Eventually, we will start a new project that will not need to patch
the kernel to work, but for now, this project is working very well for
us.

You could find this project in Alitoh
(http://alioth.debian.org/projects/debsplash). All work needed to port
gensplash to debian has been pretty much completed. We also have
packages for it so that users don't need to know essentially anything
to get debsplash up and working.

We came accross an old problem that needs a lot more support than we
previously anticipated, and that's why i decided to drop you a line
and see if you can help us.

As discussed on #debian-devel, we need a way to tell rc what to
execute for e/a initrc script that's run. This is because we need
(sometimes) to update a progressbar while the computer is booting.

You can see a copy of our current rc script from here:
http://www.latinomixed.com/downloads/rc

What I was thinking is that the current rc could use "hooks" to call
certain files if they exist from a predefined location. And then have
yet another hook to call a script after and/or before e/a initrc
script has been executed succesfully.

So for instance, to setup a given rc so that whatever it will be doing
can be done, it could contain a line like:

if [ -f "/etc/default/rc.init" ]; then
      source /etc/default/rc.init
fi

Which will simply setup rc in whatever ways the user wants to set it
up. In other words, the users can put variables, functions and source
other files from there.

And lastly, for each initrc script that's run from rc, rc will call
some other command like:

if [ -x "/etc/init.d/rc.exec" ]; then
     /etc/init.d/rc.exec
fi

Simply executing whatever that command is meant to be doing.

That way if these files don't exist, the boot process will continue
normally, as it currently does. Perhaps a commented out version of
this file could be placed there for users to be "reminded" that they
could do other things (and for the security conscious people who would
like to have those files in their tripwire/whatever-other-db, etc...).

Please let us know what you think about these ideas.

I'll try to experiment with ways to do this work, and do a minor fork
of the sysv-rc package for our own project (for the meantime) just to
get things moving forward.

Thanks in advanced for your time. I know that you can certainly come
up with a better answer to this problem. Perhaps a lot more "hooks"
are needed than I'm anticipating now, but you are the man with the
experience here.


-- 
----)(----- 
Luis M
System Administrator
LatinoMixed.com 

"We think basically you watch television to turn your brain off, and
you work on your computer when you want to turn your brain on" --
Steve Jobs in an interview for MacWorld Magazine 2004-Feb

No .doc: http://www.fsf.org/philosophy/no-word-attachments.es.html