Browse Source

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 13 years ago committed by Harald Hoyer
parent
commit
8a0d2fc56f
  1. 4
      modules.d/45url-lib/url-lib.sh

4
modules.d/45url-lib/url-lib.sh

@ -74,7 +74,7 @@ set_http_header() { @@ -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() { @@ -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

Loading…
Cancel
Save