Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Bug#676604: nfs-kernel-server: fails to start if exports are only defined in /etc/exports.d/*.exports (http://www.linux-archive.org/debian-kernel/677915-bug-676604-nfs-kernel-server-fails-start-if-exports-only-defined-etc-exports-d-exports.html)

Vagrant Cascadian 06-27-2012 09:01 PM

Bug#676604: nfs-kernel-server: fails to start if exports are only defined in /etc/exports.d/*.exports
 
tags 676604 patch
thanks

On Fri, Jun 08, 2012 at 12:06:15AM -0700, Vagrant Cascadian wrote:
> After upgrading nfs-kernel-server, it fails to start, complaining that there are no exports.
>
> service nfs-kernel-server start
> Not starting NFS kernel daemon: no exports. ... (warning).
>
> I do not have any changes to /etc/exports, it is true, but do have exports
> defined in /etc/exports.d/*.exports, and these are valid exports.
>
> By commenting out the check for an empty /etc/exports (introduced to resolve
> #673798) in /etc/init.d/nfs-kernel-server, nfsd starts and all is well again:
>
> if [ -f /etc/exports ] # && grep -q '^[[:space:]]*[^#]*/' /etc/exports
>
> This check should probably be either be reverted, or it should at least iterate
> it through all the /etc/exports.d/*.exports files before deciding there are no
> exports.

patch implementing the latter follows:

--- a/init.d/nfs-kernel-server
+++ b/init.d/nfs-kernel-server
@@ -60,7 +60,13 @@ do_mount() {
# See how we were called.
case "$1" in
start)
- if [ -f /etc/exports ] && grep -q '^[[:space:]]*[^#]*/' /etc/exports
+ export_files="/etc/exports"
+ for file in /etc/exports.d/*.exports ; do
+ if [ -f "$file" ]; then
+ export_files="$export_files $file"
+ fi
+ done
+ if [ -f /etc/exports ] && grep -q '^[[:space:]]*[^#]*/' $export_files
then
do_modprobe nfsd


live well,
vagrant



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120627210147.GM21245@talon.fglan


All times are GMT. The time now is 05:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.