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

    SVN-Update: Error in creating dhcpd.conf

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    26
    5.7k
    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.
    • O
      Oleg
      last edited by

      Now it’s better - I still get the Info

       * Setting up storage..........................................OK
       * Setting up and starting DHCP Server......................... !!! No router address found !!!
       !!! No dns address found !!!
      OK
       * Setting up and starting TFTP and PXE Servers................OK
      

      but the script continues and everything seems to be ok.

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

        @Oleg Can you please check to see if there is a Router/DNS address set inside of /etc/dhcp/dhcpd.conf ? Also, what are the router and DNS values inside of /opt/fog/.fogsettings now?

        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
        • O
          Oleg
          last edited by

          @Wayne-Workman
          yes in both files are the addresses set correctly

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

            @And if you re-run the installer, you should no longer get those messages !!! No dns address found !!!

            If you do not see those messages anymore, then this issue is resolved.

            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
            • O
              Oleg
              last edited by

              @Wayne-Workman I really don’t want to dissapoint you 😇
              I’ve updated now to the svn 6755 and still get the ! ! ! No router address found ! ! ! and ! ! ! No dns address found ! ! !
              How I said before - the setup is complete and everything seems to work. I only get these two “warnings”

              Here is my .fogsettings:

              ## Start of FOG Settings
              ## Created by the FOG Installer
              ## Version: 6755
              ## Install time: Sat 12 Mar 2016 05:58:49 PM CET
              ipaddress='192.168.94.111'
              interface='eth0'
              submask='255.255.255.0'
              routeraddress='192.168.94.1'
              plainrouter='192.168.94.1'
              dnsaddress='192.168.94.1'
              dnsbootimage='192.168.94.1'
              username='fog'
              password="XXXXXX"
              osid='2'
              osname='Debian'
              dodhcp='Y'
              bldhcp='1'
              blexports='1'
              installtype='N'
              snmysqluser=''
              snmysqlpass=""
              snmysqlhost=''
              installlang=''
              donate='0'
              storageLocation='/images'
              fogupdateloaded=1
              docroot='/var/www/html/'
              webroot='fog/'
              caCreated='yes'
              startrange='192.168.94.60'
              endrange='192.168.94.99'
              bootfilename='undionly.kpxe'
              packages='apache2 php5 php5-json php5-gd....
              noTftpBuild=''
              notpxedefaultfile=''
              sslpath='/opt/fog/snapins/ssl/'
              ## End of FOG Settings
              

              And this is the dhcpd.conf:

              ...
              next-server 192.168.94.111;
              # Specify subnet of ether device you do NOT want service.
              # For systems with two or more ethernet devices.
              # subnet 136.165.0.0 netmask 255.255.0.0 {}
              subnet 192.168.94.0 netmask 255.255.255.0{
                  option subnet-mask 255.255.255.0;
                  range dynamic-bootp 192.168.94.60 192.168.94.99;
                  default-lease-time 21600;
                  max-lease-time 43200;
                  option routers 192.168.94.1;
                  option domain-name-servers 192.168.94.1;
              ...
              
              Wayne WorkmanW 1 Reply Last reply Reply Quote 1
              • S
                Sebastian Roth Moderator
                last edited by Sebastian Roth

                Confirmed, found, here is the fix:

                diff --git a/lib/common/functions.sh b/lib/common/functions.sh
                index 5b3431d..15640c5 100755
                --- a/lib/common/functions.sh
                +++ b/lib/common/functions.sh
                @@ -1834,8 +1834,8 @@ configureDHCP() {
                             echo "    max-lease-time 43200;" >> "$dhcptouse"
                             [[ ! $(validip $routeraddress) -eq 0 ]] && routeraddress=$(echo $routeraddress | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b")
                             [[ ! $(validip $dnsaddress) -eq 0 ]] && dnsaddress=$(echo $dnsaddress | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b")
                -            [[ $(validip $routeraddress) -eq 0 ]] && echo "    option routers $routeraddress;" >> "$dhcptouse" || echo "    #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No router address found !!!"
                -            [[ $(validip $dnsaddress) -eq 0 ]] && echo "    option domain-name-servers $dnsaddress;" >> "$dhcptouse" || echo "    #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No dns address found !!!"
                +            [[ $(validip $routeraddress) -eq 0 ]] && echo "    option routers $routeraddress;" >> "$dhcptouse" || ( echo "    #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No router address found !!!" )
                +            [[ $(validip $dnsaddress) -eq 0 ]] && echo "    option domain-name-servers $dnsaddress;" >> "$dhcptouse" || ( echo "    #option routers 0.0.0.0" >> "$dhcptouse" && echo " !!! No dns address found !!!" )
                             echo "    class \"Legacy\" {" >> "$dhcptouse"
                             echo "        match if substring(option vendor-class-identifier, 0, 20) = \"PXEClient:Arch:00000\";" >> "$dhcptouse"
                             echo "        filename \"undionly.kkpxe\";" >> "$dhcptouse"
                

                Sorry @Tom-Elliott for just posting this here but I don’t think this is worth a pull request… 😄

                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

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

                  @Sebastian-Roth That’s fine, but it doesn’t appear to have all the data.

                  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
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    Yeah, just noticed…updated my post. Essentially it’s just some brackets missing to make the logic work like it should [[ ...]] && ... || ( ... && ...)

                    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

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

                      @Sebastian-Roth Added to the code and pushed.

                      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
                      • Wayne WorkmanW
                        Wayne Workman @Oleg
                        last edited by

                        @Oleg Can you please update and try again since there has been another fix to this? Ideally, you should no longer get the warnings.

                        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
                        • O
                          Oleg
                          last edited by

                          Perfect now! Installer and configs are all correct. From my side the problem is solved. Thanks!

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

                          182

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project