Bug 151389 - NFS init script writes "#\n" into empty exports file
Summary: NFS init script writes "#\n" into empty exports file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 3
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-17 15:16 UTC by Nils Philippsen
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-06 11:01:43 UTC
Type: ---
Embargoed:


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

Description Nils Philippsen 2005-03-17 15:16:28 UTC
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 15:23:32 UTC
Likewise with nfs-utils-1.0.7-2 on fc4test1.

Comment 2 Nils Philippsen 2005-03-17 15:24:09 UTC
Created attachment 112095 [details]
Proposed patch

Comment 3 Nils Philippsen 2005-03-17 15:25:57 UTC
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.