Hey guys. First off, absolutely the BEST imaging/cloning solution EVER!!! I use it for physical machines and VMs.
So here’s my scenario:
We have developed images for our training department that they have tweaked and tested and are super happy with. Now they want to take them on the road and do training all over the world. We run multiple events in multiple locations and rent laptops at every location so I can’t just build one FOG server and service the entire environment. Also, I have no control over the laptops other than they have to be blank-ed after use (script from bootable USB does the trick).
I found the Mobile FOG scripts and that seems to be the solution as I can load it onto a bootable USB drive (given enough storage capacity) and have multiple copies of it running around with minimal effort. Boot from USB on one of the rented laptops and have that be the server for the rest. When they are all done, use one of the other s to image the one that was used as the server.
Where i’m hung up at is that because the hardware changes from model to model, the script doesn’t work because it’s stuck on trying to monitor a certain interface that may not exist on different hardware. For example, on one laptop the NIC might enumerate as en160 while on another it may show up as enp0s25 and on yet another as enp1s0f1. The script is checking by interface so if its different the crontab job doesn’t do anything because it can’t find the interface.
Is there a way to make the script agnostic so it finds it and works?
FOG version 1.5.7 on Centos 7 via USB drive.
EDIT: so I’m not the best script writer but I can read most fairly well. It looks like the MakeFogMobile.sh script looks for the IP. I think a function could be written that checks for the interface too and compares it to the fogsettings file just it does for the IP. Then it would update the fogsettings and then the DB. I just have no idea how to write it. Isee it as something like:
while [[ -z $interf ]]; do
ip=$(for interf in `ip ntable | grep dev | sort | uniq | sed -e 's/^.*dev //;/^lo/d'`)
[[ -n $ip ]] && break
$echo "could't enumerate the interface" >> $log
Does that make sense???