Blame 0021-url-lib-make-nfs-support-optional.patch
|
Harald Hoyer |
65a3b7 |
From 8a0d2fc56feeb04d314a7fd6030bda5ce748b2f6 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
65a3b7 |
From: Will Woods <wwoods@redhat.com>
|
|
Harald Hoyer |
65a3b7 |
Date: Wed, 29 Feb 2012 13:09:57 -0500
|
|
Harald Hoyer |
65a3b7 |
Subject: [PATCH] url-lib: make nfs support optional
|
|
Harald Hoyer |
65a3b7 |
|
|
Harald Hoyer |
65a3b7 |
Only include /lib/nfs-lib.sh if it exists, and then only run
|
|
Harald Hoyer |
65a3b7 |
add_url_handler if nfs-lib was imported.
|
|
Harald Hoyer |
65a3b7 |
---
|
|
Harald Hoyer |
65a3b7 |
modules.d/45url-lib/url-lib.sh | 4 ++--
|
|
Harald Hoyer |
9e9f8f |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
65a3b7 |
|
|
Harald Hoyer |
65a3b7 |
diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
|
|
Harald Hoyer |
65a3b7 |
index 1fc80a1..043a700 100755
|
|
Harald Hoyer |
65a3b7 |
--- a/modules.d/45url-lib/url-lib.sh
|
|
Harald Hoyer |
65a3b7 |
+++ b/modules.d/45url-lib/url-lib.sh
|
|
Harald Hoyer |
65a3b7 |
@@ -74,7 +74,7 @@ set_http_header() {
|
|
Harald Hoyer |
65a3b7 |
|
|
Harald Hoyer |
65a3b7 |
### NFS ##############################################################
|
|
Harald Hoyer |
65a3b7 |
|
|
Harald Hoyer |
65a3b7 |
-. /lib/nfs-lib.sh
|
|
Harald Hoyer |
65a3b7 |
+[ -e /lib/nfs-lib.sh ] && . /lib/nfs-lib.sh
|
|
Harald Hoyer |
65a3b7 |
|
|
Harald Hoyer |
65a3b7 |
nfs_already_mounted() {
|
|
Harald Hoyer |
65a3b7 |
local server="$1" path="$2" localdir="" s="" p=""
|
|
Harald Hoyer |
65a3b7 |
@@ -112,4 +112,4 @@ nfs_fetch_url() {
|
|
Harald Hoyer |
65a3b7 |
[ -f "$outloc" ] || return 253
|
|
Harald Hoyer |
65a3b7 |
echo "$outloc"
|
|
Harald Hoyer |
65a3b7 |
}
|
|
Harald Hoyer |
65a3b7 |
-add_url_handler nfs_fetch_url nfs nfs4
|
|
Harald Hoyer |
65a3b7 |
+command -v nfs_to_var >/dev/null && add_url_handler nfs_fetch_url nfs nfs4
|