summaryrefslogtreecommitdiffstats
path: root/util.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-04-06 16:23:51 -0400
committerJim Meyering <jim@meyering.net>2006-04-06 16:23:51 -0400
commitecdf6cbd431de42756f3928b883854d36367b634 (patch)
tree0544161b2c9591fea668f0b65ee383d36e99a0b2 /util.py
parent5b0f54d5674a1b47c112342994b6f0bae6172809 (diff)
downloadthird_party-cobbler-ecdf6cbd431de42756f3928b883854d36367b634.tar.gz
third_party-cobbler-ecdf6cbd431de42756f3928b883854d36367b634.tar.xz
third_party-cobbler-ecdf6cbd431de42756f3928b883854d36367b634.zip
Intermediate checkin. Working on various TODO features including inheritable kernel options, moving kickstarts to URLs, improved listing, etc. This commit breaks some things that will be fixed shortly...
Diffstat (limited to 'util.py')
-rw-r--r--util.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/util.py b/util.py
index f5450e4..8752a35 100644
--- a/util.py
+++ b/util.py
@@ -129,17 +129,12 @@ class BootUtil:
return None
"""
- Similar to find_kernel and find_initrd, see if a path or filename
- references a kickstart...
+ Check if a kickstart url looks like an http, ftp, or nfs url.
"""
- def find_kickstart(self,path):
- # Kickstarts must be explicit.
- # FUTURE: Look in configured kickstart path and don't require full paths to kickstart
- # FUTURE: Open kickstart file and validate that it's real
- if os.path.isfile(path):
- return path
- joined = os.path.join(self.config.kickstart_root, path)
- if os.path.isfile(joined):
- return joined
+ def find_kickstart(self,url):
+ x = url.lower()
+ for y in ["http://","nfs://","ftp://"]:
+ if x.startswith(y):
+ return url
return None