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

Change Image ID Number

Scheduled Pinned Locked Moved Solved
FOG Problems
3
44
12.2k
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.
  • R
    RobTitian16 @Wayne Workman
    last edited by Oct 17, 2016, 2:14 PM

    @Wayne-Workman Thanks for this, although when running the script I receive the following errors:

    0_1476713516864_Capture.PNG

    The blanked out part of line 23 is the password. Yet when running:

    mysql -h localhost -u root -p"password" -D fog
    

    I’m able to log-in perfectly fine.

    W 1 Reply Last reply Oct 17, 2016, 2:20 PM Reply Quote 0
    • W
      Wayne Workman @RobTitian16
      last edited by Oct 17, 2016, 2:20 PM

      @RobTitian16 Edit the script, at the top is username and password and host. Set those to what is needed. If root works, use root and “password” and set the host to “localhost”

      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/

      R 2 Replies Last reply Oct 17, 2016, 2:48 PM Reply Quote 0
      • R
        RobTitian16 @Wayne Workman
        last edited by Oct 17, 2016, 2:48 PM

        @Wayne-Workman Indeed, I set those as root and “password” with the host being “localhost”. It gave me those errors in the previous screenshot.

        1 Reply Last reply Reply Quote 0
        • R
          RobTitian16 @Wayne Workman
          last edited by Oct 17, 2016, 2:50 PM

          @Wayne-Workman 0_1476715852117_Capture.PNG

          W T 3 Replies Last reply Oct 17, 2016, 2:53 PM Reply Quote 0
          • W
            Wayne Workman @RobTitian16
            last edited by Wayne Workman Oct 17, 2016, 8:54 AM Oct 17, 2016, 2:53 PM

            @RobTitian16 line 17 is actually the if argument. Try to put a space between the [[ and ]] brackets and the inner line between them. Like:
            if [[ $snmysqlhost != "" ]]; then

            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
            • T
              Tom Elliott @RobTitian16
              last edited by Oct 17, 2016, 2:55 PM

              @RobTitian16 Looks to my like your snmysqlpass and snmysqlhost fields are using missmatching quotes.

              The snmysqlpass looks to start with a single quote but end with a double quote.

              THe snmysqlhost field looks like it’s much the same.

              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

              W 1 Reply Last reply Oct 17, 2016, 3:00 PM Reply Quote 1
              • W
                Wayne Workman @Tom Elliott
                last edited by Oct 17, 2016, 3:00 PM

                @Tom-Elliott Yup. I didn’t look close enough at it lol.

                Looks like a simple typo. In the original script I posted, it’s good.

                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/

                R 1 Reply Last reply Oct 17, 2016, 3:03 PM Reply Quote 0
                • R
                  RobTitian16 @Wayne Workman
                  last edited by Oct 17, 2016, 3:03 PM

                  @Wayne-Workman Thanks, although that’s actually a result of me blocking out the password. I can confirm there are double quotes on all 3 lines. I copied and pasted the code below, so it’s all the same as far as I can tell.
                  I can also confirm there is a space between the [[ and ]] brackets and the inner line between them, as suggested.

                  W 1 Reply Last reply Oct 17, 2016, 3:15 PM Reply Quote 0
                  • T
                    Tom Elliott @RobTitian16
                    last edited by Oct 17, 2016, 3:06 PM

                    @RobTitian16, @Wayne-Workman is correct.

                    On all the of the “if lines” you must have a space after [[ and before ]]

                    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

                    W 1 Reply Last reply Oct 17, 2016, 3:52 PM Reply Quote 1
                    • T
                      Tom Elliott @Wayne Workman
                      last edited by Oct 17, 2016, 3:06 PM

                      @Wayne-Workman I’d recommend updating this, the if statements are missing spaces.

                      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

                      T 1 Reply Last reply Oct 17, 2016, 3:07 PM Reply Quote 0
                      • T
                        Tom Elliott @Tom Elliott
                        last edited by Oct 17, 2016, 3:07 PM

                        @Tom-Elliott Never mind apparently it’s removing excess spaces for some reason.

                        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

                        R 1 Reply Last reply Oct 17, 2016, 3:09 PM Reply Quote 0
                        • R
                          RobTitian16 @Tom Elliott
                          last edited by Oct 17, 2016, 3:09 PM

                          @Tom-Elliott BAM - that seems to have worked! Thanks!

                          0_1476716967015_Capture.PNG

                          1 Reply Last reply Reply Quote 1
                          • W
                            Wayne Workman @RobTitian16
                            last edited by Wayne Workman Oct 17, 2016, 9:16 AM Oct 17, 2016, 3:15 PM

                            @RobTitian16 Try to double quote the variables in there like this:

                            if [[ "$snmysqlhost" != "" ]]; then

                            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/

                            R 1 Reply Last reply Oct 17, 2016, 3:17 PM Reply Quote 0
                            • R
                              RobTitian16 @Wayne Workman
                              last edited by RobTitian16 Oct 17, 2016, 10:02 AM Oct 17, 2016, 3:17 PM

                              @Wayne-Workman It seemed to work without double quoting the variables - I just had to put spaces, like:

                              if [[ $snmysqlhost != “” ]] then

                              1 Reply Last reply Reply Quote 0
                              • T
                                Tom Elliott
                                last edited by Oct 17, 2016, 3:23 PM

                                https://github.com/NodeBB/NodeBB/issues/5126

                                Created issue about the spaces being stripped out.

                                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 2
                                • W
                                  Wayne Workman @Tom Elliott
                                  last edited by Oct 17, 2016, 3:52 PM

                                  @Tom-Elliott said in Change Image ID Number:

                                  @RobTitian16, @Wayne-Workman is correct.

                                  On all the of the “if lines” you must have a space after [[ and before ]]

                                  Tom, you’re correct. And this whole mis-understanding and errors with the script are due to a nodeBB bug. It was stripping out the spaces between the brackets. I’ve checked the script’s original text that I posted by clicking the “edit” button on the post, there are spaces there but the forums isn’t displaying the spaces, so when @RobTitian16 copy/pasted he got a copy without the needed spaces.

                                  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/

                                  R 1 Reply Last reply Oct 17, 2016, 4:03 PM Reply Quote 1
                                  • R
                                    RobTitian16 @Wayne Workman
                                    last edited by Oct 17, 2016, 4:03 PM

                                    @Wayne-Workman Thanks for the assistance with this - it’s much appreciated!
                                    It might be an idea to put this on the wiki once all is done as it would be quite helpful to others, I’m sure 🙂

                                    1 Reply Last reply Reply Quote 1
                                    • W
                                      Wayne Workman
                                      last edited by Oct 25, 2016, 1:07 PM

                                      #wiki worthy

                                      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/

                                      R 1 Reply Last reply Oct 25, 2016, 1:32 PM Reply Quote 0
                                      • R
                                        RobTitian16 @Wayne Workman
                                        last edited by Oct 25, 2016, 1:32 PM

                                        @Wayne-Workman Just an update on this: I tried running the script again after adding an image (the FOG web gui said it was image 31), but the script didn’t appear to run at all - there was no output as before. As a workaround, I had to set the image ID manually, but is this a known issue with the script?

                                        T 1 Reply Last reply Oct 25, 2016, 1:47 PM Reply Quote 0
                                        • T
                                          Tom Elliott @RobTitian16
                                          last edited by Oct 25, 2016, 1:47 PM

                                          @RobTitian16 The scripts limitations as they currently stand will only operate if ID 1 is available to be used.

                                          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

                                          R 1 Reply Last reply Oct 25, 2016, 3:02 PM Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 2 / 3
                                          • First post
                                            Last post

                                          182

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project