Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Uyuni:Snapshots:2020.07
cobbler
fix-install-loop-for-SUSE-via-info-nopxe-param....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-install-loop-for-SUSE-via-info-nopxe-param.patch of Package cobbler
diff --git a/cobbler/actions/buildiso.py b/cobbler/actions/buildiso.py index 7a6f9df86..00ed74d89 100644 --- a/cobbler/actions/buildiso.py +++ b/cobbler/actions/buildiso.py @@ -167,7 +167,7 @@ def generate_netboot_iso(self, imagesdir, isolinuxdir, profiles=None, systems=No data = utils.blender(self.api, False, profile) # SUSE is not using 'text'. Instead 'textmode' is used as kernel option. - utils.suse_kopts_textmode_overwrite(dist, data['kernel_options']) + kopts_overwrite(system, dist, data['kernel_options'], self.api.settings()) if not re.match(r"[a-z]+://.*", data["autoinstall"]): data["autoinstall"] = "http://%s:%s/cblr/svc/op/autoinstall/profile/%s" % ( @@ -495,7 +495,7 @@ def generate_standalone_iso(self, imagesdir, isolinuxdir, distname, filesource, data = utils.blender(self.api, False, descendant) # SUSE is not using 'text'. Instead 'textmode' is used as kernel option. - utils.suse_kopts_textmode_overwrite(distro, data['kernel_options']) + kopts_overwrite(None, distro, data['kernel_options'], self.settings) cfg.write("\n") cfg.write("LABEL %s\n" % descendant.name) diff --git a/cobbler/autoinstallgen.py b/cobbler/autoinstallgen.py index 3f49d7b12..481a9831b 100644 --- a/cobbler/autoinstallgen.py +++ b/cobbler/autoinstallgen.py @@ -140,8 +140,6 @@ def generate_autoyast(self, profile=None, system=None, raw_data=None): if system is not None: name = system.name - if str(self.settings.pxe_just_once).upper() in ["1", "Y", "YES", "TRUE"]: - self.addAutoYaSTScript(document, "chroot-scripts", nopxe % (srv, name)) if self.settings.run_install_triggers: # notify cobblerd when we start/finished the installation self.addAutoYaSTScript(document, "pre-scripts", runpre % (srv, what, name)) diff --git a/cobbler/tftpgen.py b/cobbler/tftpgen.py index 7af2d439e..6b2591307 100644 --- a/cobbler/tftpgen.py +++ b/cobbler/tftpgen.py @@ -368,9 +368,6 @@ def write_pxe_file(self, filename, system, profile, distro, arch, if format == "grub": if system.netboot_enabled: template = os.path.join(self.settings.boot_loader_conf_template_dir, "grubsystem.template") - if str(self.settings.pxe_just_once).upper() in ["1", "Y", "YES", "TRUE"]: - buffer += 'set local_boot_file=\'(http,{server}:80)/cblr/svc/op/nopxe/system/{system}\'\n'\ - .format(server=self.settings.server, system=system.name) buffer += 'set system="{system}"\n'.format(system=system.name) else: local = os.path.join(self.settings.boot_loader_conf_template_dir, "grublocal.template") @@ -526,8 +523,8 @@ def build_kernel_options(self, system, profile, distro, image, arch, kopts = blended.get("kernel_options", dict()) kopts = utils.revert_strip_none(kopts) - # SUSE is not using 'text'. Instead 'textmode' is used as kernel option. - utils.suse_kopts_textmode_overwrite(distro, kopts) + # SUSE and other distro specific kernel additions or modificatins + utils.kopts_overwrite(system, distro, kopts, self.settings) # since network needs to be configured again (it was already in netboot) when kernel boots # and we choose to do it dinamically, we need to set 'ksdevice' to one of diff --git a/cobbler/utils.py b/cobbler/utils.py index 11b968eba..7eca55089 100644 --- a/cobbler/utils.py +++ b/cobbler/utils.py @@ -2054,15 +2054,17 @@ def versiontuple(v): return versiontuple(ver1) > versiontuple(ver2) -def suse_kopts_textmode_overwrite(distro, kopts): - """SUSE is not using 'text'. Instead 'textmode' is used as kernel option.""" +def kopts_overwrite(system, distro, kopts, settings): if distro and distro.breed == "suse": + """SUSE is not using 'text'. Instead 'textmode' is used as kernel option.""" if 'textmode' in list(kopts.keys()): kopts.pop('text', None) elif 'text' in list(kopts.keys()): kopts.pop('text', None) kopts['textmode'] = ['1'] - + if system and settings: + # only works if pxe_just_once is enabled in global settings + kopts['info'] = 'http://%s/cblr/svc/op/nopxe/system/%s' % (settings.server, system.name) if __name__ == "__main__": print(os_release()) # returns 2, not 3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor