• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Xinzo
    3. Best
    X
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 16
    • Best 3
    • Controversial 0
    • Groups 0

    Best posts made by Xinzo

    • Background picture not loaded

      Hi, I’ve loaded a new IPXE .png file to my Fog and change the value in the web settings. But my picture is not loaded at boot. I have the same dimensions than the bg.png (800/600) but my file is a little more heavy (45KB). Any idea ?

      posted in General Problems
      X
      Xinzo
    • RE: Use serial number as hostname in Fog

      @george1421
      I’ve done it !
      The “old” fog.auto.reg is :

      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
          res=$(curl -Lks --data "host=${host_default_name}&sysserial=${sysserial}&sysuuid=${sysuuid}&mac=$mac&productKey=${productKey}" ${web}service/auto.register.php 2>/dev/null)
      

      Here is the trick :

      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)
      

      We have to convert to base64 and then send to the script. It works like a charm.
      I suceeded when I inspected the fog.man.reg.fix Here is what helped me :

      while [[ $res != "#!ok" ]]; do
          if [[ $host_default_name != "" ]]; then
              read -p " * Enter hostname for this computer [$host_default_name]: " host
          else
              read -p " * Enter hostname for this computer: " host
          fi
          host=${host:-$host_default_name}
          if [[ ${#host} -gt 15 ]]; then
              host=${host:0:15}
              echo " | Truncated to 15 characters: $host"
              usleep 2000000
          fi
          host=$(echo $host | base64)
          res=$(curl -Lks --data "host=$host" ${web}service/hostnameloop.php 2>/dev/null)
          [[ $res != "#!ok" ]] && echo "$res"
      
      
      done
      

      Those line
      host=${host:-$host_default_name}
      host=$(echo $host | base64)
      res=$(curl -Lks --data "host=$host" ${web}service/hostnameloop.php 2>/dev/null)

      Thank you very much for your help 😁

      posted in FOG Problems
      X
      Xinzo
    • RE: Use serial number as hostname in Fog

      @george1421
      Here are my files, I’ve upload all the content of my postinitscripts folder:
      fog.postinit.txt
      fog.patch.customhostname.txt
      fog.man.reg.fix.txt
      fog.customhostname.txt
      fog.auto.reg.txt

      @george1421 said in Use serial number as hostname in Fog:

      I can see other wanting this feature too. I know I personally missed it since the FOG v0.30 days.

      Without you, impossible to implement this feature. Thanks a lot

      posted in FOG Problems
      X
      Xinzo
    • 1 / 1