Bug#390345: (no subject)
Action names can be nearly any name. If this action is not one of the default actions, FAI tries to find a hook with the name of the action. Have a look at subroutines: *) if [ -f $FAI/hooks/$FAI_ACTION ]; then echo Calling user defined action: $FAI_ACTION $FAI/hooks/$FAI_ACTION else echo ERROR: User defined action $FAI/hooks/$FAI_ACTION not found. -- regards Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#390345: (no subject)
I propose to _change_ the action name from dirinst to dirinstall. So dirinst will not be possible any more. Since dirinst is pretty new, I have no problem to rename this action. -- regards Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#390345: (no subject)
Thomas Lange wrote: Action names can be nearly any name. If this action is not one of the default actions, FAI tries to find a hook with the name of the action. Have a look at subroutines: Hmm, somehow I don't like the idea mixing up hooks and user defined actions. Whare is this actually used? When calling fai on the command line? In my understanding, the definition of a hook is something that is run _before_ an action with the same name, depending on a class that matches the CLASSNAME part in TASKNAME.CLASSNAME. Adding something like, and it's what is executed when you run fai TASKNAME in case no internal task exists with that name sounds a bit too much. Shouldn't we have then better an own directory actions instead? (just a thought, maybe I oversee something). -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#390345: (no subject)
Somehow I lost the topic. Renaming dirinst to dirinstall if fine. But when reading the Bug again right now, I have another issue. FAI should not exit hanging here also, when an unknown action is given, and no hook is found, it should exit into a clean state, with a clean error message. A program hanging with no clear state message to the user is really a bad user experience. But this might be even another bug on it's own. Henning -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#390345: (no subject)
Thomas Lange wrote: Yes maybe, but IMO it's not that bad to use the hooks directory. I accept that. Hook extend the FAI function is some way. Defining an own action is also some sort of extension. Hehe, then we should enforce to put selfwritten ( by users) scripts and classes also in the hooks directory, they are some sort of exntension :) O.k, just a joke, but to be honest, I am a fan of having good to perfect naming and definitions. When some time arrives that we change stuff in configspace anyway, we should think about a better name for the directory. Actually, just action would be better, because it contains actions and hooks for actions - Both have the word action. The opposite is not true - not both contain the word hooks. Sounds picky, but it's the sum of many small things that makes software really good. Still, just note it for a later time... Henning -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#390345: (no subject)
On Sat, 07 Oct 2006 16:51:26 +0200, Henning Sprang [EMAIL PROTECTED] said: Hmm, somehow I don't like the idea mixing up hooks and user defined actions. Whare is this actually used? When calling fai on the command line? yes, but also when doing network boot. So you can always define FAI_ACTION=myaction and if /srv/fai/config/hooks/myaction existst, it will be executed. In my understanding, the definition of a hook is something that is run _before_ an action with the same name, depending on a class that matches the CLASSNAME part in TASKNAME.CLASSNAME. Shouldn't we have then better an own directory actions instead? Yes maybe, but IMO it's not that bad to use the hooks directory. Hook extend the FAI function is some way. Defining an own action is also some sort of extension. -- regards Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]