How do snapins work?
I’m trying to understand how the snapins work code wise. I’m wanting to try to implement a location based pull for the fog client much like the multi location patch. But I’m not sure which files are doing what. Can anybody point me in the right direction? I would like to know which php file creates the task to pull the snapin from the fog server so I can maybe add a location if statement so it will pull from a storage node instead of the main fog server.
[quote=“djm79, post: 8006, member: 1568”]I’m trying to understand how the snapins work code wise. I’m wanting to try to implement a location based pull for the fog client much like the multi location patch. [/quote]
That sounds like a good project. I’d wait until 0.33 comes out, or just download that code on a spare machine and start working on it. 0.33 is unlikely to change dramatically before release (Right, Blackout?), but it is likely that whatever solution you find for 0.32 will need to be rewritten for 0.33.
Keep us updated on your efforts. If you get it working perhaps you can post a FAQ with your code.
The php files create the task records that are queried by the snapin dll on the client to see if any snapins are supposed to be installed. The index.php file in the management subfolder pulls in the include file based on the mode your in.
Right now, you’re best bet is to look through the php code and piece together what is going on. We’re coming up on the FOG 0.33 release hopefully, which is quite a bit of a rewrite of the web code, so I don’t know of anyone willing to put in the time to more fully document how FOG 0.32 does things.
I believe its the snapinclient.dll that handles this, there aren’t any php files as such that tell the client to pull snapin from a certain server- everything web side related to location of data is in the patch , there is info in the wiki on how to change .dlls in the fogclient and recompile, I just never looked at it because I just use rsync and init.gz to pull the snapins down straight after imaging and execute from root instead.
Hope this helps