wheezy fai sysinfo reboots without reboot flag

Brian Kroth bpkroth at gmail.com
Tue Aug 14 23:44:16 CEST 2012


Katarzyna Myrek <katarzyna at myrek.pl> 2012-08-14 09:00:
> Hi
> How  about creating simple bash script which would wait for user input??

Yes, but how to get it called ... (see below)

> Regards,
> Olivia
>
> On 14 sie 2012, at 04:43, Brian Kroth <bpkroth at gmail.com> wrote:
>
>> Brian Paul Kroth <bpkroth at gmail.com> 2012-08-13 15:25:
>>> Thomas Neumann <blacky+fai at fluffbunny.de> 2012-08-13 21:33:
>>>> On Mon, 13 Aug 2012 12:14:19 -0500
>>>> Brian Kroth <bpkroth at gmail.com> wrote:
>>>>> Hi all, I'm testing fai+wheezy (4.0.3) and have a client setup to pxeboot to a
>>>>> sysinfo without the reboot flag[...]
>>>>
>>>> Check the list for an earlier message of mine. I've run into the same problem.
>>>>
>>>> If no error occurs, then fai _will_ reboot the system. You can tell fai to halt instead, but you can't simply make it stop and do nothing. Reboot or Halt.
>>>>
>>>> Solution:
>>>> a) provoke an error somewhere during execution
>>>> b) use my attached patch to force a non-reboot
>>>>
>>>> bye
>>>> thomas
>>>
>>> I thought I remembered seeing something similar in the past, but couldn't find it at the time.
>>>
>>> Here it is for future hunters:
>>> https://lists.uni-koeln.de/pipermail/linux-fai/2012-July/009735.html
>>>
>>> I should have mentioned earlier that after reading the code I was starting to use option (a) above (there's almost always something that complains during a real install, but I guess not during sysinfo), but I think I'll use your hook instead.
>>>
>>> Thanks,
>>> Brian
>>
>> That hook actually never gets called when using FAI_ACTION=sysinfo since task_action()'s sysinfo case calls task_faiend() rather than "task faiend" (call_hook is done in task(), not task_faiend()).
>>
>> So, I guess it's back to figuring out how to induce a non-fatal error ...
>>
>> Thanks,
>> Brian

Well, I was gonna just move the faiend.DEFAULT hook to sysinfo.DEFAULT 
since sysinfo is currently called with "task sysinfo" so the hook will 
actually get called, but that results in sysinfo not actually getting 
called (yes I could do it manually in the hook, but that kinda sucks and 
may not jive with future stuff).

Instead, I decided to just issue an error in another hook 
(defvar.DEFAULT in my case) and depend upon the current behavior to 
force a prompt, but so far as I can tell the error.log is only created 
by the savelog.LAST.source hook, and task_sysinfo calls fai-savelog, 
which doesn't call_hook, so that doesn't work either.

So now I'm thinking that patching fai with a noreboot flag or something 
else is probably the best option.

Thoughts?

Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20120814/a57fc9a2/attachment.bin>


More information about the linux-fai mailing list