Bug 151389 - NFS init script writes "#\n" into empty exports file
NFS init script writes "#\n" into empty exports file
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: nfs-utils (Show other bugs)
3
All Linux
medium Severity low
: ---
: ---
Assigned To: Steve Dickson
Ben Levenson
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-17 10:16 EST by Nils Philippsen
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-06 07:01:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Proposed patch (581 bytes, patch)
2005-03-17 10:24 EST, Nils Philippsen
no flags Details | Diff

  None (edit)
Description Nils Philippsen 2005-03-17 10:16:28 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):
nfs-utils-1.0.6-52

How reproducible:
Always

Steps to Reproduce:
1. "> /etc/exports"
2. "service nfs restart"
  

Actual Results:  nils@wombat:~> cat /etc/exports
#
nils@wombat:~>

Expected Results:  nils@wombat:~> cat /etc/exports
nils@wombat:~>

Additional info:
Comment 1 Nils Philippsen 2005-03-17 10:23:32 EST
Likewise with nfs-utils-1.0.7-2 on fc4test1.
Comment 2 Nils Philippsen 2005-03-17 10:24:09 EST
Created attachment 112095 [details]
Proposed patch
Comment 3 Nils Philippsen 2005-03-17 10:25:57 EST
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.

Note You need to log in before you can comment on or make changes to this bug.