diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-08-25 16:35:27 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-08-25 16:35:27 -0400 |
commit | 31282c72e114bfdf5a85f81c27643ccec467be27 (patch) | |
tree | bb2344cc3130caaec953dcd3fa884176adf4d798 | |
parent | b1056166a26cb279cf8a300755f3f65a9dfe4dc3 (diff) | |
download | cobbler-31282c72e114bfdf5a85f81c27643ccec467be27.tar.gz cobbler-31282c72e114bfdf5a85f81c27643ccec467be27.tar.xz cobbler-31282c72e114bfdf5a85f81c27643ccec467be27.zip |
When --netboot-enabled is toggled (either from the command line, or via the API as with the pxe_just_once) feature, rather than deleting the per-system config file to make it boot locally, instead create a per-system config file to make it boot locally, thus making sure any default or ip-range orders on the boot server do not reinstall the system.
-rw-r--r-- | CHANGELOG | 6 | ||||
-rw-r--r-- | cobbler/action_check.py | 4 | ||||
-rw-r--r-- | cobbler/pxegen.py | 20 | ||||
-rw-r--r-- | setup.py | 1 | ||||
-rw-r--r-- | templates/pxelocal.template | 9 |
5 files changed, 28 insertions, 12 deletions
@@ -1,6 +1,12 @@ Cobbler CHANGELOG (all entries mdehaan@redhat.com unless noted otherwise) +- ??? - 1.2 +- (FEAT) All development work from 1.X merged in +- (FEAT) when --netboot-enabled is toggled, rather than deleting the PXE config, create a local boot PXE config +- (BUGF) disable some s390 aspects of cobbler check until it is supported + + - ??? - 1.1.1 - (FEAT) make template replacement use regex module - (BUGF) remove bootloader check in settings as that code doesn't need it diff --git a/cobbler/action_check.py b/cobbler/action_check.py index 55d4bc29..6ad46de2 100644 --- a/cobbler/action_check.py +++ b/cobbler/action_check.py @@ -77,7 +77,9 @@ class BootCheck: self.check_for_default_password(status) self.check_for_unreferenced_repos(status) self.check_for_unsynced_repos(status) - self.check_vsftpd_bin(status) + + # comment out until s390 virtual PXE is fully supported + # self.check_vsftpd_bin(status) return status diff --git a/cobbler/pxegen.py b/cobbler/pxegen.py index b634512f..7d12d958 100644 --- a/cobbler/pxegen.py +++ b/cobbler/pxegen.py @@ -197,7 +197,7 @@ class PXEGen: else: continue - if system.netboot_enabled and system.is_management_supported(): + if system.is_management_supported(): if not image_based: self.write_pxe_file(f2,system,profile,distro,distro.arch) else: @@ -339,11 +339,6 @@ class PXEGen: more details """ - # --- - # system might have netboot_enabled set to False (see item_system.py), if so, - # don't do anything else and flag the error condition. - if system is not None and not system.netboot_enabled: - return None if image and not os.path.exists(image.file): return None # nfs:// URLs or something, can't use for TFTP @@ -379,11 +374,14 @@ class PXEGen: # --- # choose a template if system: - template = "/etc/cobbler/pxesystem.template" - if arch == "s390x": - template = "/etc/cobbler/pxesystem_s390x.template" - elif arch == "ia64": - template = "/etc/cobbler/pxesystem_ia64.template" + if system.netboot_enabled: + template = "/etc/cobbler/pxesystem.template" + if arch == "s390x": + template = "/etc/cobbler/pxesystem_s390x.template" + elif arch == "ia64": + template = "/etc/cobbler/pxesystem_ia64.template" + else: + template = "/etc/cobbler/pxelocal.template" else: template = "/etc/cobbler/pxeprofile.template" @@ -110,6 +110,7 @@ if __name__ == "__main__": (etcpath, ['templates/pxesystem_s390x.template']), (etcpath, ['templates/pxesystem_ia64.template']), (etcpath, ['templates/pxeprofile.template']), + (etcpath, ['templates/pxelocal.template']), (etcpath, ['templates/zone.template']), # kickstart dir diff --git a/templates/pxelocal.template b/templates/pxelocal.template new file mode 100644 index 00000000..bc422148 --- /dev/null +++ b/templates/pxelocal.template @@ -0,0 +1,9 @@ +DEFAULT local +PROMPT 0 +TIMEOUT 0 +TOTALTIMEOUT 0 +ONTIMEOUT local + +LABEL local + LOCALBOOT 0 + |