diff options
Diffstat (limited to 'cobbler')
-rw-r--r-- | cobbler/action_import.py | 9 | ||||
-rw-r--r-- | cobbler/utils.py | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/cobbler/action_import.py b/cobbler/action_import.py index 7f5409b..377b122 100644 --- a/cobbler/action_import.py +++ b/cobbler/action_import.py @@ -192,13 +192,6 @@ class Importer: print _("- skipping distro %s since it wasn't imported this time") % profile.distro continue - # THIS IS OBSOLETE: - # - #if not distro.kernel.startswith("%s/ks_mirror/" % self.settings.webdir): - # # this isn't a mirrored profile, so we won't touch it - # print _("- skipping %s since profile isn't mirrored") % profile.name - # continue - if (self.kickstart_file == None): kdir = os.path.dirname(distro.kernel) base_dir = "/".join(kdir.split("/")[0:-2]) @@ -287,6 +280,8 @@ class Importer: def set_kickstart(self, profile, flavor, major, minor): if flavor == "fedora": + if major >= 8: + return profile.set_kickstart("/etc/cobbler/sample_end.ks") if major >= 6: return profile.set_kickstart("/etc/cobbler/sample.ks") if flavor == "redhat" or flavor == "centos": diff --git a/cobbler/utils.py b/cobbler/utils.py index 2d601c7..8cc75bb 100644 --- a/cobbler/utils.py +++ b/cobbler/utils.py @@ -480,13 +480,19 @@ def fix_mod_python_select_submission(repos): repos = repos.replace('"',"") repos = repos.lstrip().rstrip() return repos + def check_dist(): + """ + Determines what distro we're running under. + """ if os.path.exists("/etc/debian_version"): return "debian" else: + # valid for Fedora and all Red Hat / Fedora derivatives return "redhat" -def redhat_release(): +def os_release(): + if check_dist() == "redhat": if not os.path.exists("/bin/rpm"): @@ -536,7 +542,7 @@ def tftpboot_location(): return t # otherwise, guess based on the distro - (make,version,rest) = redhat_release() + (make,version,rest) = os_release() if make == "fedora" and version >= 9: return "/var/lib/tftpboot" return "/tftpboot" |