Red Hat Bugzilla – Bug 151389
NFS init script writes "#\n" into empty exports file
Last modified: 2007-11-30 17:11:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1 Fedora/1.0 StumbleUpon/1.998
Description of problem:
When testing system-config-nfs, I wondered why removing all entries still gave me a non-empty /etc/exports. Using strace revealed that /etc/init.d/nfs actually writes a hash mark into /etc/exports while it is not really necessary (/etc/exports must be readable, but can be empty for the NFS server to function).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. "> /etc/exports"
2. "service nfs restart"
Actual Results: nils@wombat:~> cat /etc/exports
Expected Results: nils@wombat:~> cat /etc/exports
Likewise with nfs-utils-1.0.7-2 on fc4test1.
Created attachment 112095 [details]
The patch above only touches and chmods /etc/exports if it's not xistent or not
readable instead of if it's non-existent or empty.