diff --git a/README.md b/README.md index 21d2d0a..91d1576 100644 --- a/README.md +++ b/README.md @@ -408,6 +408,12 @@ An example Vagrant project has been included to get you started right away. maartenbeeckmans upstream + + check_nfs + vandenboer + + + ### Contributions diff --git a/check_nfs.sh b/check_nfs.sh new file mode 100755 index 0000000..d23a955 --- /dev/null +++ b/check_nfs.sh @@ -0,0 +1,84 @@ +#!/bin/sh +# +# Usage: +# Requires showmount command from nfs-utils or nfs-common. +# Checks the given host for NFS shares and tries to mount them. +# If all shares are mountable then the exit code is 0 +# Exit code 1 means the system doesn't support NFS +# Exit code 2 means the showmount command is not found +# Exit code 3 means one share couldn't be mounted +# Exit code 4 means there are no shares found + +host='' +localdir='/tmp/nfs_test' +exit_code=0 + +usage() { +echo " +usage: $0