I’m trying to start work on this, but I could use a hand in understanding how fog operates.
I can see in the ‘default’ file that holds the configuration for the fog pxe menu that different fog functions are called from the menu like so:
[CODE]LABEL fog.quickimage
kernel fog/kernel/bzImage
append initrd=fog/images/init.gz root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= mode=quickimage keymap= web=192.168.1.1/fog/ loglevel=4 consoleblank=0
MENU LABEL Quick Image
TEXT HELP
This mode will allow you to image this host quickly with
it’s default assigned image.
ENDTEXT[/CODE]
In the above example, the ‘mode=quickimage’ is obviously what determines how fog will operate when that menu item is selected. What I’m not clear on is where the underlying code is located that receives this argument. In theory, we can then write a function for renaming the host (probably re-using lots of code from one of the existing functions, as we’ll be accessing similar parts of the fog database). Then, we can simply add a new entry to the ‘default’ pxe menu config file with ‘mode=renamehost’
For the time being, I’ve left a grep -iR command running to see if I can find the code myself