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

    Let's make scripts!

    Scheduled Pinned Locked Moved
    FOG Problems
    8
    32
    15.3k
    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.
    • cmlC
      cml Moderator
      last edited by

      Hacked one together for Debian which may cover Ubuntu as well. I am not sure on the DHCP status and config portion, but I will set up a server to test tonight.

      [url=“/_imported_xf_attachments/1/1887_DebianScript.zip?:”]DebianScript.zip[/url]

      1 Reply Last reply Reply Quote 0
      • ch3iC
        ch3i Moderator
        last edited by

        Hi,

        You can create a single script for each version using uname like this :
        [CODE]DISTRIB_NAME=($(uname -v | grep -w -o “Debian|Ubuntu|Redhat|Fedora”)) # add other redhat/debian based

        if [ “$DISTRIB_NAME” == “Debian” ] || [ “$DISTRIB_NAME” == “Ubuntu” ] || [ “$DISTRIB_NAME” == “Other_Debian_Based” ]
        then
        your instructions here;
        elif [ “$DISTRIB_NAME” == “Fedora” ] || [ “$DISTRIB_NAME” == “Redhat” ] || [ “$DISTRIB_NAME” == “Other_Redhat_Based” ]
        then
        your instructions here;
        fi[/CODE]

        Regards,
        Ch3i.

        1 Reply Last reply Reply Quote 0
        • cmlC
          cml Moderator
          last edited by

          Pulled code from the FOG installer scripts to come up with the combination. I left Arch commented out at the end of the script if anyone wants to give a go at it. If not I can after testing completes next week.

          [url=“/_imported_xf_attachments/1/1891_FogScript.zip?:”]FogScript.zip[/url]

          1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman
            last edited by

            [quote=“cml, post: 45691, member: 28688”]cml[/quote]
            Thank you for the logic, it’s exactly what was needed!

            [quote=“ch3i, post: 45671, member: 2513”]Ch3i.[/quote]
            Thanks for taking the time to convert the commands to Debian, and putting together all the code.

            I’ve made a few small changes - mostly to simplify things a bit more.

            I’ve changed the output path to whatever directory it’s run from.
            I also changed the Fedora output from “Fedora21Fog.txt” to just “FedoraFog.txt”
            I changed the name of the file to simply “troubleshoot.sh” for simplicity and obviousness.

            It works beautifully on Fedora 21.

            If anyone can think of anything else that should be included in the checks, suggestions are welcome.
            If someone can test the Debian portions to see if they work on Ubuntu, that’d be great because Ubuntu is the most used distro for FOG.
            And, as we can, get people to continue adding to the script for other distros of Linux.

            Before you know it, we will have a one-stop-shop for information collection to aid in troubleshooting - be it here on the forums, or to help people with a starting place so they can help themselves.

            The latest script is attached.

            [B]OSs covered so far:[/B]
            Fedora 20/21
            Debian

            [url=“/_imported_xf_attachments/1/1902_troubleshoot.zip?:”]troubleshoot.zip[/url]

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            1 Reply Last reply Reply Quote 0
            • cmlC
              cml Moderator
              last edited by

              Few changes.

              Ubuntu had to be run with sudo, so added a root check to the beginning of the file.
              Ubuntu also has UFW as a firewall, added a check for that.
              Changed the Debian/Ubuntu version check to ‘lsb_release -a’ to get more information.
              Pointed the log file to a variable that is $Distro-Fog.txt
              The script now overwrites the log if ran again.

              Script and Debian/Ubuntu logs attached.

              [url=“/_imported_xf_attachments/1/1907_troubleshoot.zip?:”]troubleshoot.zip[/url]

              1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman
                last edited by

                Tom helped with a command to convert the output file to windows-friendly text. I’ve added this at the very bottom of the script.

                Latest and greatest is attached.

                [url=“/_imported_xf_attachments/1/1910_troubleshoot.zip?:”]troubleshoot.zip[/url]

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott
                  last edited by

                  Here’s a more refined version. This particular should work on CentOS/Redhat (in general e.g. 5,6,7) and Fedora.

                  It also prints that the file is complete and where it can be located.

                  [url=“/_imported_xf_attachments/1/1911_troubleshoot.zip?:”]troubleshoot.zip[/url]

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott
                    last edited by Tom Elliott

                    Here’s slightly more refined. Log items are somewhat nice now (more informative). Theres also a lot more checking.

                    troubleshoot.zip

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman
                      last edited by

                      Now that’s awesome. This is going to be a major help for troubleshooting!

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      1 Reply Last reply Reply Quote 0
                      • Joseph HalesJ
                        Joseph Hales Testers
                        last edited by

                        Can we sticky this and add to the wikki.

                        RTFM

                        1 Reply Last reply Reply Quote 0
                        • Joseph HalesJ
                          Joseph Hales Testers
                          last edited by

                          When I ran the latest version in this thread I got the following output in terminal.
                          ./troubleshoot.sh: line 19: [: : integer expression expected
                          rpcbind: unrecognized service
                          nfs: unrecognized service
                          iptables: unrecognized service
                          Usage FOGMulticastManager {start|stop|restart}
                          Usage FOGSnapinReplicator {start|stop|restart}
                          Usage FOGImageReplicator {start|stop|restart}
                          Usage FOGScheduler {start|stop|restart}
                          Script Completed Wed May 6 16:10:25 CDT 2015
                          Your logfile can be found in /home/jhales/test/FOGtroubleshoot.log

                          [url=“/_imported_xf_attachments/1/1977_FOGtroubleshoot.log.txt?:”]FOGtroubleshoot.log.txt[/url]

                          RTFM

                          1 Reply Last reply Reply Quote 0
                          • ch3iC
                            ch3i Moderator
                            last edited by

                            [quote=“Tom Elliott, post: 46119, member: 7271”]Here’s slightly more refined. Log items are somewhat nice now (more informative). Theres also a lot more checking.[/quote]

                            Hi,

                            Is it possible to had it in the web interface ?

                            Regards,
                            Ch3i.

                            1 Reply Last reply Reply Quote 0
                            • ch3iC
                              ch3i Moderator
                              last edited by

                              [quote=“Joseph Hales, post: 46929, member: 18131”]When I ran the latest version in this thread I got the following output in terminal.
                              ./troubleshoot.sh: line 19: [: : integer expression expected
                              rpcbind: unrecognized service
                              nfs: unrecognized service
                              iptables: unrecognized service
                              Usage FOGMulticastManager {start|stop|restart}
                              Usage FOGSnapinReplicator {start|stop|restart}
                              Usage FOGImageReplicator {start|stop|restart}
                              Usage FOGScheduler {start|stop|restart}
                              Script Completed Wed May 6 16:10:25 CDT 2015
                              Your logfile can be found in /home/jhales/test/FOGtroubleshoot.log[/quote]

                              Hi,

                              For the status of FOG services I have submit modifications here : [url]http://fogproject.org/forum/threads/add-the-status-of-fog-services-in-the-command-service.12912/[/url]

                              Regards,
                              Ch3i.

                              1 Reply Last reply Reply Quote 0
                              • Wayne WorkmanW
                                Wayne Workman
                                last edited by

                                I will work on integrating these.

                                Tom, is the latest and greatest the last thing you’ve posted?

                                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                Daily Clean Installation Results:
                                https://fogtesting.fogproject.us/
                                FOG Reporting:
                                https://fog-external-reporting-results.fogproject.us/

                                1 Reply Last reply Reply Quote 0
                                • Tom ElliottT
                                  Tom Elliott
                                  last edited by

                                  Probably?

                                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 0
                                  • Joseph HalesJ
                                    Joseph Hales Testers
                                    last edited by

                                    Where in the SVN is this being placed or is it not part of it then?

                                    RTFM

                                    1 Reply Last reply Reply Quote 0
                                    • Tom ElliottT
                                      Tom Elliott
                                      last edited by

                                      I haven’t coded or tested it for all the specifications of different os’s so it’s not part of it yet…

                                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                      1 Reply Last reply Reply Quote 0
                                      • Wayne WorkmanW
                                        Wayne Workman
                                        last edited by

                                        Can we get attachments working? I can’t grab the latest script.

                                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                        Daily Clean Installation Results:
                                        https://fogtesting.fogproject.us/
                                        FOG Reporting:
                                        https://fog-external-reporting-results.fogproject.us/

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          afuente26
                                          last edited by afuente26

                                          This post is deleted!
                                          1 Reply Last reply Reply Quote 0
                                          • cmlC
                                            cml Moderator
                                            last edited by

                                            [troubleshoot.zip](uploading 100%)

                                            I added a function to add the revision number.

                                            Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            232

                                            Online

                                            12.1k

                                            Users

                                            17.3k

                                            Topics

                                            155.4k

                                            Posts
                                            Copyright © 2012-2024 FOG Project