Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675644 - =net-fs/nfs-utils-2.3.3 - /etc/init.d/nfs restart removes current exports
Summary: =net-fs/nfs-utils-2.3.3 - /etc/init.d/nfs restart removes current exports
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-16 21:54 UTC by bspot
Modified: 2019-09-02 07:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bspot 2019-01-16 21:54:35 UTC
/etc/init.d/nfs restart

removes current exports (exportfs -ua) although that's exactly what's not supposed to happen according to the comments in the file.

The offending line is:

/etc/init.d/nfs:134: if [ "${restarting}" = no -o "${RC_CMD}" = "restart" ] ; then

which should probably read

if [ "${restarting}" = no -a "${RC_CMD}" != "restart" ] ; then

Steps to reproduce:
1. /etc/init.d/nfs start
2. /etc/init.d/nfs restart
3. Observe this line appearing in the output:
   * Unexporting NFS directories ...   [ ok ]
Comment 2 Larry the Git Cow gentoo-dev 2019-09-02 07:08:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=998148dd775a5c629266fcd1c93837ac8ee3541d

commit 998148dd775a5c629266fcd1c93837ac8ee3541d
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2019-09-02 05:50:16 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2019-09-02 07:08:13 +0000

    net-fs/nfs-utils: Don't unexport directories on restart
    
    Originally added in 2007 (see commit a0fefa89daef "Remove some bashisms
    and support baselayout-2 restart option." in the historical repo), = vs
    != looks like an obvious typo. But, with RC_CMD, we don't need the extra
    restarting variable.
    
    Closes: https://bugs.gentoo.org/675644
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 net-fs/nfs-utils/files/nfs.initd | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)