diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-10-30 10:55:03 -0500 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-10-30 10:55:03 -0500 |
commit | 0f5ffd7d163ed8ca46de8fd7024cdfa9ad541ef9 (patch) | |
tree | 14390231651206026a098f855397b8edb95ac715 /cobbler/action_sync.py | |
parent | 68c6ec5f26e67d578e4629c817dddd187ff40510 (diff) | |
download | third_party-cobbler-0f5ffd7d163ed8ca46de8fd7024cdfa9ad541ef9.tar.gz third_party-cobbler-0f5ffd7d163ed8ca46de8fd7024cdfa9ad541ef9.tar.xz third_party-cobbler-0f5ffd7d163ed8ca46de8fd7024cdfa9ad541ef9.zip |
Slight tweak to dlutter's upgrade to the default pxe behavior -- use the default.pxe file unless a system has been provided named default -- so this allows "local boot" as the default behavior but allows setting boot-to-profile as a global policy if someone wants to do that.
Diffstat (limited to 'cobbler/action_sync.py')
-rw-r--r-- | cobbler/action_sync.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index 60919e7..e007a77 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -373,8 +373,14 @@ class BootSync: # FIXME: Log something inobtrusive ifthe default file is missing src = "/etc/cobbler/default.pxe" if os.path.exists(src): - dst = os.path.join(self.settings.tftpboot, "pxelinux.cfg", "default") - self.copyfile(src, dst) + nocopy = False + for system in self.systems: + if system.name == "default": + nocopy = True + break + if not nocopy: + dst = os.path.join(self.settings.tftpboot, "pxelinux.cfg", "default") + self.copyfile(src, dst) for system in self.systems: profile = self.profiles.find(system.profile) |