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

    Unable to detect Red Hat 6.6 during install

    Scheduled Pinned Locked Moved Solved
    Linux Problems
    3
    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.
    • T
      tmerrick
      last edited by tmerrick

      I am now getting errors during installation of the SVN trunk on a Red Hat 6.6 system. I found that $linuxReleaseName and $OSVersion are not being set correctly in bin/.install.sh

      Here are the files and contents that those variables depend on.

      [root@clstfogi ~]# ls -ld /etc/*release*
      -rw-r--r--. 1 root root  152 Jun 17 10:42 /etc/lsb-release
      drwxr-xr-x. 2 root root 4096 Jun 17 10:42 /etc/lsb-release.d
      -rw-r--r--. 1 root root   55 Sep 15  2014 /etc/redhat-release
      lrwxrwxrwx. 1 root root   14 Jun 17 10:41 /etc/system-release -> redhat-release
      -rw-r--r--. 1 root root   49 Sep 15  2014 /etc/system-release-cpe
      [root@clstfogi ~]# cat /etc/redhat-release
      Red Hat Enterprise Linux Server release 6.6 (Santiago)
      

      If you notice that both the name is being set as ‘Red’, not Redhat. And the version is coming from an incorrect file (/etc/lsb-release). What I did was to add the check for Red and set the correct values:

      else
              linuxReleaseName=`cat /etc/system-release 2>/devnull | head -n1 | awk '{print $1}'`;
          if [[ "$linuxReleaseName" == "Red" ]]; then
              linuxReleaseName="Redhat";
              OSVersion=`awk -F'[^0-9]*' /[Rr]elease*\([^.]*\).*/'{print $2}' /etc/redhat-release | head -n1`
          fi
      fi
      

      I did not check this into the SVN because I had to change the /etc/release to /etc/system-release. I guess that we need to do another check like the /etc/os-release for the /etc/system-release link before falling through to the default one.

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

        I agree.

        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
          tmerrick
          last edited by

          Here is the whole paragraph that should be production ready. I think that it will work with Centos too. I basically added the code from the elif to the else.

          if [ -f "/etc/os-release" ]; then
                  linuxReleaseName=`sed -n 's/^NAME=\(.*\)/\1/p' /etc/os-release | tr -d '"'`;
              OSVersion=`sed -n 's/^VERSION_ID=\([^.]*\).*/\1/p' /etc/os-release | tr -d '"'`;
          elif [ -f "/etc/system-release" ]; then
              linuxReleaseName=`cat /etc/system-release 2>/dev/null | head -n1 | awk '{print $1}'`;
              if [[ "$linuxReleaseName" == "Red" ]]; then
                  linuxReleaseName="Redhat";
              fi
              OSVersion=`awk -F'[^0-9]*' /[Rr]elease*\([^.]*\).*/'{print $2}' /etc/system-release | head -n1`
          else
              linuxReleaseName=`cat /etc/*release* 2>/dev/null | head -n1 | awk '{print $1}'`;
          fi
          
          1 Reply Last reply Reply Quote 1
          • T
            tmerrick
            last edited by tmerrick

            Here are the values assigned on the 3619 SVN:

            linuxReleaseName = LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
            OSVersion =
            

            The current fix does not work as the /etc/<star>release<star> pulls up unwanted files.

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

              @tmerrick I’ve made more adjustments. Can you please test and let me know how you make 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 1
              • T
                tmerrick
                last edited by

                Works okay in fog version 3642

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post

                156

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project