Full registration customised
-
Hello,
I plan to create a custom full registration with only name asked.
I have read how to edit fog.man.reg but I wonder how i can change an image ID properly to 999 for exemple to set it by default in the registration and avoid to edit file again if I capture a new image.
I also look for setting a domain name and yes to deploy now instead of the “no” set by default.
Thank you for your help. -
Do you think writing this in fog.man.reg after line
[[ $exists != "#!ok" ]] && handleError "Unable to register host: $exists ($0)\n Args Passed: $*"
could do it :
host="" imageid="999" blDoAD="Y" realdoimage=$(echo -n 1 | base64) res="" user64=$(echo "fog" | tr -d '\012' | base64) pass64=$(echo "password" | tr -d '\012' | base64) while [[ $res != "#!ok" ]]; do echo -n " * Enter hostname for this computer: " read host if [[ ${#host} -gt 15 ]]; then host=${host:0:15} echo " | Truncated to 15 characters: $host" usleep 2000000 fi host=$(echo $host | base64) res=$(curl -Lks --data "host=$host" ${web}service/hostnameloop.php 2>/dev/null) [[ $res != "#!ok" ]] && echo "$res" done dots "Attempting to register host" res="" while [[ -z $res ]]; do res=$(curl -Lks --data "sysuuid=${sysuuid}&mac=$mac&advanced=$(echo -n 1 | base64)&host=$host&imageid=$imageid&doimage=$realdoimage&doad=$blDoAD&username=$user64&password=$pass64" ${web}service/auto.register.php 2>/dev/null) echo "$res" usleep 2000000 done . /bin/fog.inventory usleep 2000000