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

Modify client to do system inventory on PXE boot

Scheduled Pinned Locked Moved
General
4
6
1.9k
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.
  • B
    Bart Smit
    last edited by Jul 7, 2012, 6:13 PM

    I’d like to adapt the FOG client to take an inventory automatically after PXE boot. I’ve unpacked the init.gz and had a look around, but I’m unsure of the next steps. What would be the best strategy to:

    • run the DMI report
    • run the partitions report for all local drives
    • tarball/zip the results and FTP them

    TIA for any pointers

    Bart…

    1 Reply Last reply Reply Quote 0
    • B
      BryceZ
      last edited by Jul 9, 2012, 4:48 PM

      Off the top of my head I’d suggest editing /etc/init.d/S99fog and adding a conditional statement like
      [CODE]if [ “$mode” != “inventory” ]; then
      sh /bin/fog.inventory;[/CODE]
      before the rest of the $mode checks.

      So…
      [CODE]afterActionTerm=“reboot -f”;
      if [ “$shutdown” = “on” ]
      then
      afterActionTerm=“poweroff”;
      fi

      if [ “$mode” == “debug” ]; then
      [/CODE]

      becomes…

      [CODE]afterActionTerm=“reboot -f”;
      if [ “$shutdown” = “on” ]
      then
      afterActionTerm=“poweroff”;
      fi

      if [ “$mode” != “inventory” ]; then
      sh /bin/fog.inventory;

      if [ “$mode” == “debug” ]; then
      [/CODE]

      Warning: That was off the top of my head and has not been tested.

      1 Reply Last reply Reply Quote 0
      • C
        chad-bisd Moderator
        last edited by Jul 9, 2012, 4:50 PM

        Are you wanting to take an inventory every time the computer PXE boots?


        If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

        1 Reply Last reply Reply Quote 0
        • B
          Bart Smit
          last edited by Jul 9, 2012, 5:39 PM

          @Bryce,

          @Chad, yes indeed, basically I want to use the PXE image to get the hardware info and then change the host to point the client to an image based on that info.

          I’ll have a look at the init.d scripts and update this thread

          Thanks,

          Bart…

          1 Reply Last reply Reply Quote 0
          • L
            Lethal Kebab
            last edited by Jul 14, 2012, 3:50 AM

            Dude… That’s a top idea…

            Please let me know if you have any success…

            I too have heavily modified fog to do extra stuff, if only there was a way to combine all these customizations…

            1 Reply Last reply Reply Quote 0
            • C
              chad-bisd Moderator
              last edited by Jul 16, 2012, 2:24 PM

              Right now, the inventory task ends with a clearing of the task file and a reboot. If you want to perform an inventory and then do more stuff, I think you’ll have to modify that behavior without interfering with the rest of the tasks that call the inventory scripts.


              If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

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

              264

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project