jimi(a)sngx.net wrote:
---
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index babdafd..3d85f53 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -562,6 +562,29 @@ class Importer:
profile.set_virt_type("qemu")
self.profiles.add(profile,save=True)
+
+ # Create a rescue image as well,
+ # assuming this isn't a xen distro
+ if name.find("-xen") == -1:
+ rescue_name = 'rescue-' + name
+ existing_profile = self.profiles.find(name=rescue_name)
+
+ if existing_profile is None:
+ print _("- creating new profile: %s") % rescue_name
+ profile = self.config.new_profile()
+ else:
+ print _("- modifying existing profile: %s") % rescue_name
+ profile = existing_profile
+
+ profile.set_name(rescue_name)
+ profile.set_distro(name)
+ profile.set_virt_type("qemu")
+
+ profile.kernel_options['rescue'] = None
+ profile.kickstart = '/etc/cobbler/pxerescue.ks'
+
+ self.profiles.add(profile,save=True)
+
self.api.serialize()
return distro
Do you mind rebasing this changeset? It does not apply after the new
patches.
We also might want to just do this for breed == redhat unless we can
confirm all debian needs is the "rescue" kernel option.
--Michael