* Perry Myers <[email protected]> [2009-11-16 14:56]: > On 11/16/2009 02:21 PM, Ryan Harper wrote: > > Add a kernel parameter, vendor= which takes a path to a script > > embedded in the image. If this script is executable, we will then > > source it during ovirt-early start() after command line processing > > and before mounting of /config. We also call a post hook at the end of > > ovirt-early start(). > > > > Also include a sample vendor script. > > If you're using edit-livecd to embed a vendor specific script in the oVirt > ISO image, why wouldn't you just change the init process to call that > script instead of using a kernel cmdline parameter like this? > > i.e. edit-livecd to add a new init script called vendor-foo to > /etc/init.d, then chkconfig that script on. Now during startup the script > will automatically execute. > > I suppose maybe some information about the use case that is driving this > request might help to explain.
Sure, one of the use cases we need is using an iscsi target as "local" disk. This requires bringing up networking and iscsi prior to ovirt-early trying to mount the /config partition. Previously, had just injected code around the area where the pre hook is now. Recently moved that to it's own function so we could conditionally call it.. then looking at how to merge any of that upstream and it made more sense to keep the very vendory specific changes out of ovirt-early altogether. I hadn't thought to do a completely separate file since some of the logic triggers on other boot parameters that ovirt-early processes (like firstboot, and storage_init). I'll have to look at seeing if we could move that into it's own init script; though there might be some duplication of code (command parsing, and such). With the vendor approach, it executes in the same context as ovirt-early so one can potentially override function implementations and exert control over the flow in the remainder of ovirt-early; that wouldn't be doable in a separate init script. One example that we rely upon that can't be done from separate script is appending boot parameters to the params list to be saved. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx [email protected] _______________________________________________ Ovirt-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/ovirt-devel
