exportfs returns zero exit status when fails to resolve hostname of NFS client
Issue
- exportfs returns zero exit status when failed to resolve hostname of NFS client.
# cat /etc/exports
/home/nfs-srv7 *(rw,no_root_squash,sync)
/home/harry test.abcd.efgh.ijkl(rw,no_root_squash,sync)
# exportfs -avr
exportfs: Failed to resolve test.abcd.efgh.ijkl
exportfs: Failed to resolve test.abcd.efgh.ijkl
exporting *:/home/nfs-srv7
# echo $?
0
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.