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

    erase of Exports File

    Scheduled Pinned Locked Moved Solved
    General
    5
    21
    6.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.
    • O
      olivierl
      last edited by

      Hi
      I have tested this norming and it’s worrking for my case.

      Olivier

      Wayne WorkmanW 1 Reply Last reply Reply Quote 2
      • Tom ElliottT
        Tom Elliott
        last edited by

        What’s the actual code?

        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

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

          @Tom-Elliott has added a new option in /opt/fog/.fogsettings

          blexports=

          1 means to rebuild /etc/exports
          0 means do not rebuild it.

          https://forums.fogproject.org/topic/5975/dhcpd-conf-file-gets-rebuilt-on-every-install

          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/

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

            @Tom-Elliott In lib/common/functions.sh

            configureNFS() {
                echo -e "$storageLocation *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)\n$storageLocation/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)" > "$nfsconfig";
                dots "Setting up and starting RPCBind";
                if [ "$systemctl" == "yes" ]; then
                    systemctl enable rpcbind.service >/dev/null 2>&1 && \
                    systemctl restart rpcbind.service >/dev/null 2>&1 && \
                    systemctl status rpcbind.service >/dev/null 2>&1
                elif [ "$osid" -eq 2 ]; then
                    true
                else
                    chkconfig rpcbind on >/dev/null 2>&1 && \
                    $initdpath/rpcbind restart >/dev/null 2>&1 && \
                    $initdpath/rpcbind status >/dev/null 2>&1
                fi
                errorStat $?
                dots "Setting up and starting NFS Server..."
                for nfsItem in $nfsservice; do
                    if [ "$systemctl" == "yes" ]; then
                        systemctl enable $nfsItem >/dev/null 2>&1 && \
                        systemctl restart $nfsItem >/dev/null 2>&1 && \
                        systemctl status $nfsItem >/dev/null 2>&1
                    else
                        if [ "$osid" == 2 ]; then
                            sysv-rc-conf $nfsItem on >/dev/null 2>&1 && \
                            $initdpath/nfs-kernel-server stop >/dev/null 2>&1 && \
                            $initdpath/nfs-kernel-server start >/dev/null 2>&1
                        else
                            chkconfig $nfsItem on >/dev/null 2>&1 && \
                            $initdpath/$nfsItem restart >/dev/null 2>&1 && \
                            $initdpath/$nfsItem status >/dev/null 2>&1
                        fi
                    fi
                    if [ "$?" -eq 0 ]; then
                        break
                    fi
                done
                errorStat $?
            }
            
            Tom ElliottT 1 Reply Last reply Reply Quote 0
            • ch3iC
              ch3i Moderator @Wayne Workman
              last edited by

              @Wayne-Workman said:

              @Tom-Elliott has added a new option in /opt/fog/.fogsettings

              blexports=

              1 means to rebuild /etc/exports
              0 means do not rebuild it.

              https://forums.fogproject.org/topic/5975/dhcpd-conf-file-gets-rebuilt-on-every-install

              It’ll be better to have it automatically in the installer like the @olivierl solution.

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

                @ch3i much appreciated but I meant the code for the sed statement not the function code that needs to be altered.

                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

                ch3iC 1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by

                  @Tom-Elliott Code snippet was provided by olivierl in this thread (post number 11).

                  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
                  • ch3iC
                    ch3i Moderator @Tom Elliott
                    last edited by

                    @Tom-Elliott said:

                    @ch3i much appreciated but I meant the code for the sed statement not the function code that needs to be altered.

                    https://forums.fogproject.org/topic/5952/erase-of-exports-file/11

                    1 Reply Last reply Reply Quote 0
                    • O
                      olivierl
                      last edited by

                      Hi,

                      It’'s work but before use it i think i need to verify before if the line "/image and image/dev"exist
                      To make the transition from a version that does not contain ##Fog–share-start##
                      to avoid having 2 times sharing appear in the file

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

                        Oh now I see what @olivierl did here… added those tags to the top and bottom.

                        ##FOG-SHARE-START##
                        ##FOG-END-SHARE##

                        That’s pretty smart.

                        But I don’t think the new blexports setting should be undone, but I think that this could be added…
                        In fact something similar is not a bad idea for all of the conf files that fog touches…

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

                        149

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project