Skip to content

Commit

Permalink
Should add token getter and hinfo gather appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
mastacontrola committed Jul 20, 2024
1 parent 637de92 commit f04a10a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ if [[ $boottype == usb && ! -z $web ]]; then
sysuuid=$(dmidecode -s system-uuid)
sysuuid=${sysuuid,,}
mac=$(getMACAddresses)
curl -Lks -o /tmp/hinfo.txt --data "sysuuid=${sysuuid}&mac=$mac" "${web}service/hostinfo.php" -A ''
base64mac=$(echo $mac | base64)
token=$(curl -Lks --data "mac=$base64mac" "${web}status/hostgetkey.php")
curl -Lks -o /tmp/hinfo.txt --data "sysuuid=${sysuuid}&mac=$mac&hosttoken=${token}" "${web}service/hostinfo.php" -A ''
[[ -f /tmp/hinfo.txt ]] && . /tmp/hinfo.txt
fi
dots "Running post init scripts"
Expand Down

0 comments on commit f04a10a

Please sign in to comment.