>>>>> On Tue, 22 May 2012 12:56:56 +0200, "Thomas Neumann" >>>>> <blacky+...@fluffbunny.de> said:
> Hello > In the original prepareapt hook, there are (were?) two different if-clauses: > if [ -f /var/run/fai/FAI_INSTALLATION_IN_PROGRESS ]; then > if [ $do_init_tasks -eq 1 ] ; then In FAI 4.0 there's a third one: if [ $FAI_ACTION = "install" ]; then > I'm not too sure what they are supposed to mean so I ask for > clarification. Judging from the code/names they seem to guard the enclosed > code against running during a softupdate. Yes, I think you are right. > b) What is the proper/best/most obvious/recommended way to let code run > only during the initial installation? The third one should be the cleanest way IMO. > c) Does install/dirinstall make a difference? That depends on your needs. $do_init_tasks and FAI_INSTALLATION_IN_PROGRESS does not distiguish between install, dirinstall, softupdate, whatever, but $FAI_ACTION does. -- regards Thomas