[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Udeb questions



Hello fellas,

I'm taking a stab at rolling my own udebs, and I have a question about
how I should design things.  I've been thinking about this for a while now,
and while I would like to contribute my stuff back to the community, I can't
think of a way to do what I want to do without forcing changes on others in
the event that my contributions are found useful.



Here is what I want to do:  I want to be able to preseed a command, similar in
concept to the preseed/(early|late)_command, that is executed after hardware
is detected and drivers are loaded at particular stages in the installation
process.  But to accomplish my goals, this command must also be executed
before other udebs are installed, because what I want is to modify things that
would affect the installation of the udebs that follow.

Particularly, what *I* want to be able to do is drop a script on my install
media that gets run after ethernet-card-dectection, but before any of netcfg's
udebs.  What I want is to be able to look at the hardware detected and
optionally set netcfg preseed values based on what I find.  But, it would seem
to me that nothing I can do is a simple drop-in addition to the debian
installer.

I can write my own udeb and make it dependent upon ethernet-card-detection,
but I can't guarentee that my udeb will be installed before netcfg -- unless I
also modify netcfg to make it dependent upon my udeb.  (...Right?)

Or

I could modify ddetect and give ethdetect's postinst script support for
executing a preseeded late_command, or I could modify netcfg and add support
for executing a preseeded early_command.

Either way, it would mean modifying someone else's packages, which I would
like to avoid.  ...Unless there's yet more to debian udeb packaging than I
currently understand (which is probable).

But, it gets even more complicated:

To really do the kind of scripting stuff I want to do, I'll need to have tools
provided that the current busybox udeb doesn't provide, but which busybox is
capable of.  Another modification I am considering is to have busybox-cvs
generate an extra busybox udeb -- maybe busybox-cvs-extended-udeb package --
that has a version of busybox compiled with the extra tools I need.

If I build my own udeb, then I can make my udeb dependent upon the new busybox
udeb.  But if I only modify other, existing udebs, then I have to find some
other way of getting my extended version of busybox installed before my
scripts are executed.

If I modify anybody else's packages at all, I would be tempted to modify
ddetect, and add support for executing a late_command after ethdetect,
hw-detect, and hw-detect-full.  It would seem like a more generic solution
that others might find useful.  (Say for instance, sorting out the
module-loading-order problem that surrounds SATA devices on some hardware.
...Another problem I may be facing very soon.)



Of course, if all I do is modify things for myself, then there's no problems,
just more work for me whenever new versions of things are released.  But I
kinda wanted to be able to contribute back to the Debian community.  If I
could just figure out how to do what I want as a simple, drop-in addition,
that would be sweet...



Whaddaya think sirs?

Michael Peek



Reply to: