[PATCH] Allow file:// url handler in --repo arg

Brian C. Lane bcl at redhat.com
Tue May 27 17:32:06 UTC 2014


When doing --image installations it would be nice to be able to point to
a local repo without needing a http server. The fix here is simple,
treat a --repo=file:/// as a url method and everything works.

There was a suggestion to allow pointing directly to an iso file, but
adding support for that would mean complicating the code. It is better
to allow the user to mount their image and point Anaconda to the
moutpoint.
---
 anaconda | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/anaconda b/anaconda
index 7499bc3..8eff482 100755
--- a/anaconda
+++ b/anaconda
@@ -1068,7 +1068,8 @@ if __name__ == "__main__":
             ksdata.method.partition = device
             ksdata.method.dir = path
         elif anaconda.methodstr.startswith("http") or \
-             anaconda.methodstr.startswith("ftp"):
+             anaconda.methodstr.startswith("ftp") or \
+             anaconda.methodstr.startswith("file"):
             ksdata.method.method = "url"
             ksdata.method.url = anaconda.methodstr
             # installation source specified by bootoption
-- 
1.9.0



More information about the anaconda-patches mailing list