summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/imager/direct_plugin.py24
1 files changed, 2 insertions, 22 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py
index 1d0d3ff546..9cd7068333 100644
--- a/scripts/lib/wic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/wic/plugins/imager/direct_plugin.py
@@ -93,9 +93,6 @@ class DiskImage():
93 self.device = device 93 self.device = device
94 self.created = False 94 self.created = False
95 95
96 def exists(self):
97 return os.path.exists(self.device)
98
99 def create(self): 96 def create(self):
100 if self.created: 97 if self.created:
101 return 98 return
@@ -229,26 +226,9 @@ class DirectImageCreator:
229 # partitions list from kickstart file 226 # partitions list from kickstart file
230 return self.ks.partitions 227 return self.ks.partitions
231 228
232 def _full_name(self, name, extention):
233 """ Construct full file name for a file we generate. """
234 return "%s-%s.%s" % (self.name, name, extention)
235
236 def _full_path(self, path, name, extention): 229 def _full_path(self, path, name, extention):
237 """ Construct full file path to a file we generate. """ 230 """ Construct full file path to a file we generate. """
238 return os.path.join(path, self._full_name(name, extention)) 231 return os.path.join(path, "%s-%s.%s" % (self.name, name, extention))
239
240 def get_default_source_plugin(self):
241 """
242 The default source plugin i.e. the plugin that's consulted for
243 overall image generation tasks outside of any particular
244 partition. For convenience, we just hang it off the
245 bootloader handler since it's the one non-partition object in
246 any setup. By default the default plugin is set to the same
247 plugin as the /boot partition; since we hang it off the
248 bootloader object, the default can be explicitly set using the
249 --source bootloader param.
250 """
251 return self.ks.bootloader.source
252 232
253 # 233 #
254 # Actual implemention 234 # Actual implemention
@@ -346,7 +326,7 @@ class DirectImageCreator:
346 For example, prepare the image to be bootable by e.g. 326 For example, prepare the image to be bootable by e.g.
347 creating and installing a bootloader configuration. 327 creating and installing a bootloader configuration.
348 """ 328 """
349 source_plugin = self.get_default_source_plugin() 329 source_plugin = self.ks.bootloader.source
350 if source_plugin: 330 if source_plugin:
351 name = "do_install_disk" 331 name = "do_install_disk"
352 methods = pluginmgr.get_source_plugin_methods(source_plugin, 332 methods = pluginmgr.get_source_plugin_methods(source_plugin,