#!/bin/bash . /usr/share/fog/lib/funcs.sh clearScreen displayBanner disks="" disk="" hd="" sysman="" sysproduct="" sysversion="" sysserial="" sysuuid="" systype="" biosversion="" biosvendor="" biosdate="" mbman="" mbproductname="" mbversion="" mbseral="" mbasset="" cpuman="" cpuversion="" cpucurrent="" cpumax="" mem="" hdinfo="" caseman="" casever="" caseserial="" caseasset="" sysman64="" sysproduct64="" sysversion64="" sysserial64="" sysuuid64="" systype64="" biosversion64="" biosvendor64="" biosdate64="" mbman64="" mbproductname64="" mbversion64="" mbserial64="" mbasset64="" cpuman64="" cpuversion64="" cpucurrent64="" cpumax64="" mem64="" hdinfo64="" caseman64="" casever64="" caseserial64="" caseasset64="" dots "Using disk device" getHardDisk echo "$hd" echo "Starting host registration" debugPause mac=$(getMACAddresses | base64) sysuuid=$(dmidecode -s system-uuid) sysuuid=${sysuuid,,} sysuuid=$(echo $sysuuid | base64) sysserial=$(dmidecode -s system-serial-number) sysserial=${sysserial,,} sysserial=$(echo $sysserial | base64) dots "Attempting to register host" count=0 res="" productKey="" host_default_name="" if [[ -f "/bin/fog.customhostname" ]]; then . /bin/fog.customhostname fi if [[ -f /sys/firmware/acpi/tables/MSDM ]]; then productKey=$(tail -c+57 /sys/firmware/acpi/tables/MSDM | base64) fi while [[ -z $res ]]; do host=${host_default_name} host=$(echo $host | base64) res=$(curl -Lks --data "host=$host&sysserial=${sysserial}&sysuuid=${sysuuid}&mac=$mac&productKey=${productKey}" ${web}service/auto.register.php 2>/dev/null) case $count in [0-8]) let count+=1 usleep 5000000 ;; 9) echo "Failed" debugPause handleError "Cannot register host. ($0)\n Args Passed: $*" ;; esac done echo "$res" debugPause . /bin/fog.inventory count=0i