nfsd won't start unless exports has content
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nfs-utils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Since the following change:
--- a/debian/
+++ b/debian/
@@ -61,7 +61,13 @@
# See how we were called.
case "$1" in
start)
- if [ -f /etc/exports ]
+ export_
+ for file in /etc/exports.
+ if [ -f "$file" ]; then
+ export_
+ fi
+ done
+ if [ -f /etc/exports ] && grep -q '^[[:space:
then
It is no longer possible to start nfsd without content in /etc/exports (or /etc/exports.d/*), making it impossible to create temporary exports (ie - using exportfs) if the host does not have permanent exports. This also breaks other alternative management tools that eschew /etc/exports, like ZFS.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: nfs-kernel-server 1:1.2.6-3ubuntu1
ProcVersionSign
Uname: Linux 3.5.0-14-generic x86_64
NonfreeKernelMo
ApportVersion: 2.5.2-0ubuntu1
Architecture: amd64
Date: Tue Sep 18 10:47:08 2012
InstallationMedia: Ubuntu-Server 12.10 "Quantal Quetzal" - Alpha amd64 (20120903.2)
ProcEnviron:
LANGUAGE=en_AU:en
TERM=xterm-
PATH=(custom, no user)
LANG=en_AU.UTF-8
SHELL=/bin/bash
SourcePackage: nfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)
I can't see from the changelogs what this was meant to fix, but users already have methods of disabling nfsd if they don't want it to start, so this change in behaviour doesn't seem to be necessary, and breaks expected behaviour.
I can see two ways of solving this, either by simply deleting the `grep -q '^[[:space: ]]*[^#] */' $export_files` test (preferable since it restores expected behaviour), or by introducing an additional switch in /etc/default/ nfs-kernel- server to control whether nfsd is started with empty exports (this could default to on to restore expected behaviour, but this still seems superfluous, since the user can simply disable the init job using existing mechanisms).