fai wishlist

Thomas Lange lange at informatik.Uni-Koeln.DE
Wed Feb 20 14:26:27 CET 2002


>>>>> On Tue, 19 Feb 2002 11:49:51 -0800, "Bruce  Edge" <bedge at troikanetworks.com> said:

    > I've run into a situation I can't figure out how to handle
    > properly.  I need to load a scsi driver, aic7xxx _before_
    > task_setup is run, as there are no disks defined before the
    > module is loaded.  The disks need to be defined by the time
    > task_setup is called, as that's where disk_info is called.
    > Right now I've just stuck it in rcS_fai, in fai_init, but that's
    > not where is should have to go.  The class/scripts get executed
    > too late to put it in there.

task defclass will be the only part where classes are defined. You
can't define classes at a later point of time, since it very difficult
to add a class later but remain LAST as the last class and hostname
the last but one class.

Kernel driver should be loaded in class/*.mod scripts. It's now (in
the CVS tree, FAI version 2.3pre) possible that these scripts also define
variables. If the disk info changes when loading a driver just call
the disk_info subroutine in your *.mod script again.

Example: class/S20scsi.mod

#! /bin/sh

if ifclass CHECKSCSI; then
	modprobe aic7xxx
	< check if scsi disk found >
	newclasses="SCSI AIC7XXX"
fi



    > Also, when I need to define new classes in the hooks scripts,
    > how can I force a re-read of the /tmp/additional-classes
    > file. Currently I'm just calling task_defclass after I add stuff
    > to that file, but that multiply defines all existing classes. Is
    > there a better way?  I believe your install.MENU hook has the
    > same problem.

install.MENU is now class/S30menu.source. Now all scripts
class/s[0-9]*.source are sourced and can define new classes by using
$newclasses. Look in S30menu.source for an example.

/tmp/additional-classes can only be used in hooks/*.defclass

Hope this helps
-- 
Gruss Thomas



More information about the linux-fai mailing list