Hi
In your script before add share it can be this
if [ -f $nfsconfig ]
then
if [ $(grep -c "##FOG-SHARE-START##" $nfsconfig) -ne 0 ]
then
sed -in '/##FOG-SHARE-START##/,/##FOG-END-SHARE##/{//d;D}' $nfsconfig
fi
fi
And add this configureNFS()
echo -e "##FOG-SHARE-START##\n$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)\n##FOG-END-SHARE##" >> "$nfsconfig";
I am not tested for the moment
Olivier