Quantcast
Channel: Linux Problems
Viewing all articles
Browse latest Browse all 59

postdownload script...

$
0
0

Hey All,

I recently transferred a perfectly working fog project server to another server and pouched the postdownload script functionality. I’ve gone through a bit of debugging. I put a /bin/bash inside my /images/postdownloadscripts/fog.postdownload so that I could shell out and see why I’m not getting the client hostinfo that I used to fetch with curl leveraging the fog-api-token and fog-user-token.

I’ve validated that my ${FOG_API_TOKEN} contains the same string that is on my configuration page of my fog server. I’ve also validated that my ${FOG_USER_TOKEN} contains the same API string for a user within my user list. Both the user and the fog settings have the api enabled.

Yet if I issue the following from my bash shell on the client after doing the pxeboot:

curl -A “” -Lks
-o /tmp/hostinfo.sh
-H ‘Content-Type: application/json’
-H “fog-api-token: ${FOG_API_TOKEN}”
-H “fog-user-token: ${FOG_USER_TOKEN}”
${web}/service/hostinfo.php
–data “mac=$mac”

Where $mac is the mac address of the pxe booted client, and $web simply contains http://192.168.1.35/fog/. Yet the contents of the file /tmp/hostinfo.sh is essentially:

No token passed to authenticate this host

I kinda need the othertag1 from the fogserver where I store some unique information about the client. Prior to my moving of my server to the new configuration this worked fine… Any insight on this matter would be greatly appreiated.


Viewing all articles
Browse latest Browse all 59

Trending Articles