- Subject: [PATCH] url-lib: make nfs support optional
- From: Will Woods <wwoods@xxxxxxxxxx>
- Date: Sun, 26 Feb 2012 14:40:12 -0500
Only include /lib/nfs-lib.sh if it exists, and then only run
add_url_handler if nfs-lib was imported.
---
modules.d/45url-lib/url-lib.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
index 383e7ac..7b669f4 100755
--- a/modules.d/45url-lib/url-lib.sh
+++ b/modules.d/45url-lib/url-lib.sh
@@ -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
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]