url-lib: make nfs support optional

Only include /lib/nfs-lib.sh if it exists, and then only run
add_url_handler if nfs-lib was imported.
master
Will Woods 2012-02-29 13:09:57 -05:00 committed by Harald Hoyer
parent ffcc64bdea
commit 8a0d2fc56f
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ set_http_header() {

### NFS ##############################################################

. /lib/nfs-lib.sh
[ -e /lib/nfs-lib.sh ] && . /lib/nfs-lib.sh

nfs_already_mounted() {
local server="$1" path="$2" localdir="" s="" p=""
@ -112,4 +112,4 @@ nfs_fetch_url() {
[ -f "$outloc" ] || return 253
echo "$outloc"
}
add_url_handler nfs_fetch_url nfs nfs4
command -v nfs_to_var >/dev/null && add_url_handler nfs_fetch_url nfs nfs4