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

    How to prevent changes to existing /etc/exports file

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    12
    2.5k
    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.
    • x23piracyX
      x23piracy
      last edited by

      if not may think about making it unaccessible by the installer before updating and making it writeable again when succeeded (chmod), another may could making a backup before installing and overwriting by yourself after updating (post install script).

      Regards X23

      ║▌║█║▌│║▌║▌█

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

        If I recall correctly, add the -E argument to the installer.

        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

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

          -E did not work. It modified it anyways.

          [ Standing in between extinction in the cold and explosive radiating growth ]

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

            @sudburr I don’t know what the argument is I just know that there is one.

            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
            • x23piracyX
              x23piracy
              last edited by x23piracy

              Maybe this?

              help() {
                  echo -e "Usage: $0 [-h?dEUuHSCKYXT] [-f <filename>]"
                  echo -e "\t\t[-D </directory/to/document/root/>] [-c <sslPath>]"
                  echo -e "\t\t[-W <webroot/to/fog/after/docroot/>] [-B </backup/path/>]"
                  echo -e "\t\t[-s <192.168.1.10>] [-e <192.168.1.254>] [-b <undionly.kpxe>]"
                  echo -e "\t-h -? --help\t\t\tDisplay this info"
                  echo -e "\t-o    --oldcopy\t\t\tCopy back old data"
                  echo -e "\t-d    --no-defaults\t\tDon't guess defaults"
                  echo -e "\t-U    --no-upgrade\t\tDon't attempt to upgrade"
                  echo -e "\t-H    --no-htmldoc\t\tNo htmldoc, means no PDFs"
                  echo -e "\t-S    --force-https\t\tForce HTTPS redirect"
                  echo -e "\t-C    --recreate-CA\t\tRecreate the CA Keys"
                  echo -e "\t-K    --recreate-keys\t\tRecreate the SSL Keys"
                  echo -e "\t-Y -y --autoaccept\t\tAuto accept defaults and install"
                  echo -e "\t-f    --file\t\t\tUse different update file"
                  echo -e "\t-c    --ssl-file\t\tSpecify the ssl path"
                  echo -e "\t               \t\t\t\tdefaults to /opt/fog/snapins/ssl"
                  echo -e "\t-D    --docroot\t\t\tSpecify the Apache Docroot for fog"
                  echo -e "\t               \t\t\t\tdefaults to OS DocumentRoot"
                  echo -e "\t-W    --webroot\t\t\tSpecify the web root url want fog to use"
                  echo -e "\t            \t\t\t\t(E.G. http://127.0.0.1/fog,"
                  echo -e "\t            \t\t\t\t      http://127.0.0.1/)"
                  echo -e "\t            \t\t\t\tDefaults to /fog/"
                  echo -e "\t-B    --backuppath\t\tSpecify the backup path"
                  echo -e "\t      --uninstall\t\tUninstall FOG"
                  echo -e "\t-s    --startrange\t\tDHCP Start range"
                  echo -e "\t-e    --endrange\t\tDHCP End range"
                  echo -e "\t-b    --bootfile\t\tDHCP Boot file"
                  echo -e "\t-E    --no-exportbuild\t\tSkip building nfs file"
                  echo -e "\t-X    --exitFail\t\tDo not exit if item fails"
                  echo -e "\t-T    --no-tftpbuild\t\tDo not rebuild the tftpd config file"
                  echo -e "\t-P    --no-pxedefault\t\tDo not overwrite pxe default file"
              

              ║▌║█║▌│║▌║▌█

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

                @sudburr

                Inside of /opt/fog/.fogsettings

                Set:
                blexports='0'

                This should stop the installer from overwriting an existing installation’s exports file.
                Reference: https://wiki.fogproject.org/wiki/index.php?title=.fogsettings

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

                  @Tom-Elliott said in How to prevent changes to existing /etc/exports file:

                  If I recall correctly, add the -E argument to the installer.

                  In addition to my below post as a valid option, Tom is correct here too. In the help menu this is specified:

                  -E    --no-exportbuild		Skip building nfs file
                  

                  So if that’s not working, this should be moved to bug reports.

                  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/

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

                    @Wayne-Workman It’s working.

                    I just tested on Ubuntu and Fedora.

                    The base code this is working for seems to be working since before RC 20 (I didn’t really feel like testing earlier than that sorry ).

                    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
                    • sudburrS
                      sudburr
                      last edited by

                      Re-testing with RC27.

                      Using the installer with switch -E does not work. /etc/exports is still changed.

                      Changing to blexports=‘0’ correctly blocks the installer from changing /etc/exports .

                      sed -i.bak "s|blexports='1'|blexports='0'|g" /opt/fog/.fogsettings
                      

                      [ Standing in between extinction in the cold and explosive radiating growth ]

                      Wayne WorkmanW Tom ElliottT 2 Replies Last reply Reply Quote 0
                      • Wayne WorkmanW
                        Wayne Workman @sudburr
                        last edited by Wayne Workman

                        @sudburr said in How to prevent changes to existing /etc/exports file:

                        Using the installer with switch -E does not work. /etc/exports is still changed.

                        I just tired and confirmed this with RC-27, I’ll open a bug report.

                        https://forums.fogproject.org/topic/9050/fog-installer-e-argument-not-working

                        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 @sudburr
                          last edited by

                          @sudburr what you performed is correct, if you already had a prior config laid out. Sorry I didn’t recognize this sooner but a fix for this has been added to the next working branch.

                          Essentially the variable was being set properly, but it was being overwritten when the fog settings file was imported.

                          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
                          • 1 / 1
                          • First post
                            Last post

                          194

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project