erase of Exports File
-
Hi
I have tested this norming and it’s worrking for my case.Olivier
-
What’s the actual code?
-
@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
-
@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 $? }
-
@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.
-
@ch3i much appreciated but I meant the code for the sed statement not the function code that needs to be altered.
-
@Tom-Elliott Code snippet was provided by olivierl in this thread (post number 11).
-
@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
-
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 -
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…