PXE-less booting FOS client OS
@Tom-Elliott My thought was (must not have explained it very well since I don’t understand completely the logic you used), is just thinking ahead. What happens if the system has not been previously registered as in a new system. Will the host lookup fail (abend) or just return null? I can test this out tonight. I’ll spin up a new vm and see if I can break the hostinfo.php. I just don’t want something unexpected to impact another part of the code. But I think what has done so far is great and will let FOG move is a few directions to fill some gaps. So thank you for the attention on this.
I’ve added the suggested code so if the variable is already set, not to set it, otherwise set it up as needed.
@george1421 I think less “let me take over” is to simply check if the variables are already set. If they are not set, use what is in the hostinfo.php file.
Basically instead of just doing:
We should do something like:
[[ -z $<somevariable> ]] && <somevariable>='<somevalue>'
@Tom-Elliott Just thinking about this (using hostinfo.php) will any bits of that code fall down if the host is unregistered and that page is called. Thinking for a new host that never was seen by fog, how will that code react? The sql query (of my prototype code) would just not return any records. I do know how the updated code will react if there is no host previously defined. Would another page (kerninfo.php) be a better choice?
BUT having hostinfo.php post host AND kernel info opens some interesting opportunities. This means that host info would be immediately available to all scripts running in FOS (including all post install scripts). The IT admin developing post install scripts would not have to do anything extra to post these variables.
I’ve setup the hostinfo.php to assign the imaging kernel args information now as well.
I will try to work on getting this so “registered” hosts will no longer need this information passed in the kernel args. The only one that would be needed would be the falseTasking (which is used for non-imaged hosts) as we don’t have a record of what is to be happening.
If I pass all the kernel arguments (besides isdebug, debug, and normal kernel args) All I’d have to do for the scripts that run is source the files after calling the hostinfo.php script.