• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    postdownload script...

    Scheduled Pinned Locked Moved Unsolved
    Linux Problems
    1
    1
    118
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JasonNaughton
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post

      189

      Online

      12.0k

      Users

      17.3k

      Topics

      155.2k

      Posts
      Copyright © 2012-2024 FOG Project