]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
url-lib: check for ctorrent binary before adding the url handler
authorHarald Hoyer <harald@redhat.com>
Fri, 15 Aug 2014 15:35:11 +0000 (17:35 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 15 Aug 2014 15:35:11 +0000 (17:35 +0200)
modules.d/45url-lib/url-lib.sh

index d9cebd4dd010e346211f368016aa569e955f4f09..03c087b95c43eae2aeb6396a125087399e2df0cf 100755 (executable)
@@ -110,7 +110,9 @@ ctorrent_fetch_url() {
     fi
     if [ -z "$2" ]; then echo "$outloc" ; fi
 }
-add_url_handler ctorrent_fetch_url torrent
+
+command -v ctorrent >/dev/null \
+    && add_url_handler ctorrent_fetch_url torrent
 
 ### NFS ##############################################################