| ||
2002-08-09 10:45 / exporting read-write nfs directories »
I've been trying to set up the imac (more specifically I suppose, a machine running Darwin) as
an NFS server on my local domain. Now, there is a very good page here
(pdf, as googled html)
, that details all the NetInfo commands needed to set it up - all variations of
So, I found this page (the relevant part a few paragraphs down), and there's another
old-skool way to do it which unfortunately includes hacking a startup script: It's actually easier than the NetInfo way. You need an
/etc/exports file, which has entries such as this for each exported directory:
Now, the hack of
if [ -f /etc/exports ]; then
ConsoleMessage "Starting Network File System server"
mountd /etc/exports
nfsd -t -u -n 6
fi
#exports=$(niutil -list . /exports 2> /dev/null | wc -w)
#if [ "${exports}" -gt 0 ]; then
# ConsoleMessage "Starting Network File System server"
# mountd
# If the NetInfo config/nfsd directory contains
# startup args for nfsd, use those.
# arguments=`niutil -readprop . /config/nfsd arguments`
# nfsd ${arguments:-"-t -u -n 6"}
#fi
The commented-out code below is how it used to look. Note that we're doing a file existence test now rather than one using NetInfo. Finally, HUP all the daemons - or reboot:
Oh, I'm pretty sure you need Maybe there is a way to get the NetInfo way working - which would be preferable - but I couldn't see it. This way works, and my FreeBSD box will be happier with its donated disk-space. | ||