Hi All,
Iāve been trying to adjust fog so when we use a custom fog registration it doesnāt prompt for the Hostname but instead uses the chassis serial number which for Dellās and HPās normally relates to the service tag.
To create the custom.fog.reg Iāve duplicated fog.man.reg and changed line 158 from: āread hostā
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=$(wget --post-data="host=$host" -qO - http://${web}service/hostnameloop.php 2>/dev/null)
[[ $res != "#!ok" ]] && echo "$res"
To
# 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=$(wget --post-data="host=$host" -qO - http://${web}service/hostnameloop.php 2>/dev/null)
# [[ $res != "#!ok" ]] && echo "$res"
#done
host=$(dmidecode -s chassis-serial-number)
echo āHost: ${host}ā
Using the code from funcs.sh to grab the chassis-serial number unfortunately this is not working and the pxe seems to load the BZimage and then just skips to ācompleteā then reboots.
Can someone please help?
Please go easy on my Iām learning as I go here and this is all new territory to me!