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