Modified: trunk/darwinbuild/darwinbuild.in (524 => 525)
--- trunk/darwinbuild/darwinbuild.in 2009-06-16 22:50:35 UTC (rev 524)
+++ trunk/darwinbuild/darwinbuild.in 2009-06-19 18:16:41 UTC (rev 525)
@@ -166,11 +166,15 @@
###
stamp=$(date +'%Y%m%d%H%M%S')
if [ "$3" == "-nfs" ]; then
- echo "Adding build root to NFS exports file ..."
mkdir -p $NFSDIR
mkdir -p BuildRoot
- echo "# Added by darwinbuild on ${stamp}" >> /etc/exports
- echo "${PWDP}/${NFSDIR} -maproot=0:10" >> /etc/exports
+ exportline="${PWDP}/${NFSDIR} -maproot=0:10"
+ grep "$exportline" /etc/exports >> /dev/null 2>&1
+ if [ ! $? -eq 0 ]; then
+ echo "Adding build root to NFS exports file ..."
+ echo "# Added by darwinbuild on ${stamp}" >> /etc/exports
+ echo $exportline >> /etc/exports
+ fi
nfsd update
echo "Checking exports file ..."
nfsd checkexports