exportfs always returns success status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nfs-utils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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/
0
Search did not reveal a duplicate bug but a similar issue was resolved upstream back in 2013:
https:/
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.
This is no longer true as of 1:1.3.4- 2.1ubuntu5. 2 (bionic). Do you need this fix in xenial?