• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Greg Plamondon
    3. Posts
    • Profile
    • Following 1
    • Followers 0
    • Topics 74
    • Posts 394
    • Best 14
    • Controversial 0
    • Groups 1

    Posts made by Greg Plamondon

    • RE: Data missing from the database after host is imaged.

      @tom-elliott said in Data missing from the database after host is imaged.:

      Fixed in working.

      Basically what was happening was the other1 field is used to send emails. That part still can happen (as any value that’s not an email will just not receive an email), but it was clearing the field after it sent the email out.

      I just commented out the line as I cannot remember exactly why I was clearing it to begin with.

      Thanks Tom!

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Data missing from the database after host is imaged.

      @tom-elliott said in Data missing from the database after host is imaged.:

      Found it.

      WOW that was fast

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Data missing from the database after host is imaged.

      @tom-elliott said in Data missing from the database after host is imaged.:

      @greg-plamondon I’ve yet to hear of imaging causing a change on the other tags. Only during registration does this happen. I’ll take a look at the inventory update script, maybe I missed something?

      I have found a work around using the “Other Tag #2” for now.
      Thanks!

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Data missing from the database after host is imaged.

      @george1421 said in Data missing from the database after host is imaged.:

      @greg-plamondon So just for clarity, if you disable your fog post install script from running (from the master script) the Othertag data is removed from the database?

      I could see if you might have altered Othertag data it might happen.

      Yes, the othertag is removed. Interesting enough I am able to use the “Other Tag #2” ie “iOtherTag1” field fine.

      I also reverted back to fog 1.5.2 and I am having the same issue.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Data missing from the database after host is imaged.

      Ok, it doesn’t matter what I do with the scripts. the Othertag data is removed after I image the PC.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Data missing from the database after host is imaged.

      @greg-plamondon said in Data missing from the database after host is imaged.:

      @george1421

      if i comment out this section…

             case $othertag in
                  BAY)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.bay_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                  MPMI)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.canada_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                  JET)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.jet_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;	
                  *)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
              esac
      

      the data remains after imaging.

      I take that back… The data doesn’t persist regardless if I comment it out.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Data missing from the database after host is imaged.

      @george1421

      It’s not removing the host. its removing data from the inventory section of the database.

      You are currently running version: 1.5.2.10
      

      did you watch the video?

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • Data missing from the database after host is imaged.

      I really don’t know how to explain this issue without using a –>>VIDEO<<–.
      We use the “iOtherTag” in the inventory section to determine what company a PC belongs to, we also use this field to trigger what unattend.xml amongst other post init scripts to use. When we image the PC the “iOtherTag” table data for that host gets removed from the DB.

      Here is my “fog.postdownload”

      #!/bin/bash
      . /usr/share/fog/lib/funcs.sh
      curl -A "" -Lkso /tmp/hinfo.sh "${web}/service/hostinfo.php?mac=$mac"
      . /tmp/hinfo.sh
      [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
      case $osid in
          5|6|7|9)
              clear
              [[ ! -d /ntfs ]] && mkdir -p /ntfs
              getHardDisk
              if [[ -z $hd ]]; then
                  handleError "Could not find hdd to use"
                  
              fi
              getPartitions $hd
              for part in $parts; do
                  true
              done
              dots "Mounting partition $part"
              ntfs-3g -o force,rw $part /ntfs >/dev/null 2>&1
              if [[ ! $? -eq 0 ]]; then
                  echo "Failed"
                  debugPause
                  handleError "Failed to mount $part ($0)\n    Args: $*"
              fi
              echo "Done"
              case $othertag in
                  BAY)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.bay_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                  MPMI)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.canada_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                  JET)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.jet_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;	
                  *)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
              esac
              umount /ntfs
              ;;
          *)
              echo "Invalid OS"
              debugPause
              return
              ;;
      esac
      

      as always thanks for the help all!

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Extended fog variables problem.

      @george1421 said in Extended fog variables problem.:

      @greg-plamondon

      Change anything: No you are just telling wget to not pass the user agent parameters to FOG.

      CURL: Just replace the wget line with the curl line Tom posted. Same results just a different tool. The fog code has been updated (under the hood) to only use curl. There may be a time where curl specific calls are used. But today both work interchangeably.

      I had to use the -A option for curl to specify the user agent.

      curl -A "" -Lkso /tmp/hinfo.sh ${web}/service/hostinfo.php -d "mac=$mac" 
      

      That worked like a charm!
      Thanks @george1421 @Tom-Elliott

      posted in General
      Greg PlamondonG
      Greg Plamondon
    • RE: Extended fog variables problem.

      @greg-plamondon said in Extended fog variables problem.:

      wget -q --user-agent=“” -O /tmp/hinfo.txt “${web}/service/hostinfo.php?mac=$mac”

      Thanks @george1421 that worked.
      do i need to change anything when running that from my fog.postdownload?

      #!/bin/bash
      . /usr/share/fog/lib/funcs.sh
      wget -q --user-agent="" -O /tmp/hinfo.sh "$web/service/hostinfo.php?mac=$mac"
      . /tmp/hinfo.sh
      [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
      case $osid in
          5|6|7|9)
              clear
              [[ ! -d /ntfs ]] && mkdir -p /ntfs
              getHardDisk
              if [[ -z $hd ]]; then
                  handleError "Could not find hdd to use"
      
              fi
              getPartitions $hd
              for part in $parts; do
                  true
              done
              dots "Mounting partition $part"
              ntfs-3g -o force,rw $part /ntfs >/dev/null 2>&1
              if [[ ! $? -eq 0 ]]; then
                  echo "Failed"
                  debugPause
                  handleError "Failed to mount $part ($0)\n    Args: $*"
              fi
              echo "Done"
              debugPause
              pccompany=${hostname:2:1}
              case $pccompany in
                              2)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.bay_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                              5)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.canada_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                              7)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.jet_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                              *)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
              esac
                  umount /ntfs
              ;;
          *)
              echo "Invalid OS"
              debugPause
              return
              ;;
      esac
      

      How would I make this use curl?

      curl -A "" -Lkso /tmp/hinfo.sh ${web}/service/hostinfo.php -d "mac=$mac" 
      
      posted in General
      Greg PlamondonG
      Greg Plamondon
    • RE: Extended fog variables problem.

      @tom-elliott said in Extended fog variables problem.:

      @greg-plamondon it’s preferred to use curl over wget. Curl doesn’t send a user afebt natively so your curl would look something like

      curl -Lkso /tmp/hinfo.sh ${web}/fog/service/hinfo.php -d “mac=$mac”

      I get the same result with the above.
      if I echo $web i get:

      http://192.168.10.238/fog/
      

      I changed what you had to:

      curl -Lkso /tmp/hinfo.sh ${web}fog/service/hostinfo.php -d "mac=$mac"
      

      I create a deploy debug task for a host.
      I type fog at the shell.
      i break out of the script after nfs is mounted.
      I cd to /images/postdownloadscripts
      ./fog.postdownload
      my fog.postdown;load looks like:

      #!/bin/bash
      . /usr/share/fog/lib/funcs.sh
      curl -Lkso /tmp/hinfo.sh ${web}fog/service/hostinfo.php -d "mac=$mac"
      . /tmp/hinfo.sh
      [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
      case $osid in
          5|6|7|9)
              clear
              [[ ! -d /ntfs ]] && mkdir -p /ntfs
              getHardDisk
              if [[ -z $hd ]]; then
                  handleError "Could not find hdd to use"
      
              fi
              getPartitions $hd
              for part in $parts; do
                  true
              done
              dots "Mounting partition $part"
              ntfs-3g -o force,rw $part /ntfs >/dev/null 2>&1
              if [[ ! $? -eq 0 ]]; then
                  echo "Failed"
                  debugPause
                  handleError "Failed to mount $part ($0)\n    Args: $*"
              fi
              echo "Done"
              debugPause
              pccompany=${hostname:2:1}
              case $pccompany in
                              2)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.bay_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                              5)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.canada_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                              7)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.jet_replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
                              *)
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad
                      ;;
              esac
                  umount /ntfs
              ;;
          *)
              echo "Invalid OS"
              debugPause
              return
              ;;
      esac
      
      

      I then type echo $location and i get nothing…
      I verified that the /tmp/hinfo.sh exists.
      If i cat /tmp/hinfo.sh i get:

      Cannot view from browser
      
      posted in General
      Greg PlamondonG
      Greg Plamondon
    • RE: Extended fog variables problem.

      @george1421 said in Extended fog variables problem.:

      @george1421 I don’t have access to the exact code at the moment, but it should be something like this:

      wget -q --user-agent="" -O /tmp/hinfo.txt "$web/service/hostinfo.php?mac=$mac" 
      

      and that’s just for testing and i should leave it the other way when using in post init scripts?

      posted in General
      Greg PlamondonG
      Greg Plamondon
    • RE: Extended fog variables problem.

      @george1421 said in Extended fog variables problem.:

      It depends on how/where you execute that script. The proper URL for testing is

      http://<fog_server_ip>/fog/service/hostinfo.php?mac=$mac
      

      The bad port makes me thing the parameter ${web} is not being expanded correctly.

      The command echo $web returned the proper server url so I changed it to:

      wget -q -O /tmp/hinfo.txt "$web/service/hostinfo.php?mac=$mac" 
      

      The file hinfo.txt is created in /tmp but if you cat the file you get:

      Cannot view from browser
      
      posted in General
      Greg PlamondonG
      Greg Plamondon
    • Extended fog variables problem.

      I have used this in the past to get additional information on a host but it doesn’t work any longer.
      https://forums.fogproject.org/topic/7740/the-magical-mystical-fog-post-download-script/3
      the /tmp/hinfo.txt file isn’t created and after executing the wget command from debug i get this:

      wget -q -O /tmp/hinfo.txt "http://${web}service/hostinfo.php?mac=$mac"
      wget: bad port spec 'http:'
      

      any help would be greatly appreciated.

      posted in General
      Greg PlamondonG
      Greg Plamondon
    • Fog 1.5.2 Plugin system broken.

      You cannot remove plugins using the GUI once they are installed.
      Here is a VIDEO.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Add Wipe disk to the PXE Menu

      @wayne-workman I searched for some time and couldn’t find anything. I will give those links a try.
      Thanks!

      posted in General
      Greg PlamondonG
      Greg Plamondon
    • Add Wipe disk to the PXE Menu

      I was wondering if someone could help me add the Wipe Disk feature to the PXE menu with login required.
      Thanks.

      posted in General
      Greg PlamondonG
      Greg Plamondon
    • RE: Fog 1.5.2 Host module settings don't save

      @tom-elliott said in Fog 1.5.2 Host module settings don't save:

      Mind runnning:
      Select * from moduleStatusByHost where msHostID='0' or msModuleID='0'\G

      Here you go:
      alt text

      posted in Bug Reports
      Greg PlamondonG
      Greg Plamondon
    • RE: 503 Service Unavailable Error

      @george1421 said in 503 Service Unavailable Error:

      @greg-plamondon Thank you for the feedback, please keep (ab)using the FOG server. I’m interested in the durability of the configuration over time.

      I am interested in what Troye’s experiences with just the timeout adjustment and to see if he does run into a memory exhaustion issue. I did see one other post from the github side that ran into the memory exhaustion issue and if I remember correctly he bumped his config to 3GB and still had the issue.

      I am impressed with the speed of the GUI with these changes. Nice work guys keep up the good Work @george1421 @Tom-Elliott

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • 1
    • 2
    • 6
    • 7
    • 8
    • 9
    • 10
    • 19
    • 20
    • 8 / 20