Public bug reported: It is impossible to determine whether exportfs command failed or succeeded based on the exit status:
root@ver:~# exportfs asdf ; echo $? exportfs: Invalid exporting option: asdf 0 user@ver:~$ exportfs ; echo $? exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 13 (Permission denied) 0 Search did not reveal a duplicate bug but a similar issue was resolved upstream back in 2013: https://bugzilla.redhat.com/show_bug.cgi?id=966237 root@ver:~# lsb_release -rd Description: Ubuntu 16.04.4 LTS Release: 16.04 root@ver:~# apt-cache policy nfs-utils N: Unable to locate package nfs-utils root@ver:~# apt-cache policy nfs-kernel-server nfs-kernel-server: Installed: 1:1.2.8-9ubuntu12.1 Candidate: 1:1.2.8-9ubuntu12.1 What is expected to happen: Command exits with status = 0 only in case of successful execution What happens instead: Command exit status is 0 regardless of outcome. ** Affects: nfs-utils (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1766126 Title: exportfs always returns success status To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1766126/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
