Alright. Got home from classes, and switched computers so I could grab my notes. Of course I have to say be really careful with all of this: if something goes wrong, it will most likely make your production system not functional. Try to do all this on a test system instead of a production system, if at all possible. At least make backups/take notes of what you all changed.
I have attached the list of my notes of what I all had to change to get it working. I’d attach the files themselves… but I have a lot of other changes inside these files as well, so I tried pulling out the only changes you’d need to get subnet / location based image push.
Couple of things:
[LIST=1]
[]The subnets I’m working with are 192.168.4.0-192.168.7.255, 192.168.14., and 192.168.24.* – make sure you change the instances of this to match your subnets.
[]When FOG determines where to put the boot file named after the client’s MAC address, it is still placed on the master node. With the synchronization methods put forward by that guide, it will be duplicated across all nodes and this isn’t technically an issue.
[]Any changed files need to be sync’d (or at least copied) to the remote nodes from the main node.
[]Here’s the part I feel could be done better: Inside functions.include.php the line “$command=”/sbin/ifconfig eth0 | grep ‘inet addr:’ | cut -d: -f2 | awk ‘{ print $1}’“;” is actually executed on the server side. When I started working on this, I thought it would execute on the client side. The end result is that it still finds the correct subnet, but there has to be a better way to do this. At the very least, all of the array functions wouldn’t be necessary. You could probably just compare full IPs. I have a couple ideas for more sophisticated changes, but I haven’t gotten to test them yet. The joys of being a full time student and trying to do all this in the middle of an IT support internship…
[]So, in order to get this to run correctly, I ran into a few problems – since the folder containing the boot file “default” is being mounted on remote nodes, and since the boot files for specific MAC addresses are also in this location on the main node, I had to keep this mounted. The change involving overriding the “web” variable in S99fog inside init.gz is a workaround. A bit strange, but it works. I need to work out a solution to unmount those drives, and get the specific boot files placed in the right location in the first place. Shouldn’t be too difficult, but I haven’t had the time.
[/LIST]
Let me know if you run into any issues, and I’ll help you the best I can. I’m definitely not a FOG expert, by any means, but I’ll try.
[url=“/_imported_xf_attachments/0/303_fog_location_changes.txt?:”]fog_location_changes.txt[/url]