Attach image to loopdevice in one command

This commit is contained in:
Anders Ingemann 2013-08-17 16:38:43 +02:00
parent 5864665b1f
commit e4e6035eb2

View file

@ -36,8 +36,8 @@ class Attach(Task):
def run(self, info):
info.bootstrap_device = {}
[info.bootstrap_device['path']] = log_check_call(['/sbin/losetup', '--find'])
log_check_call(['/sbin/losetup', info.bootstrap_device['path'], info.loopback_file])
command = ['/sbin/losetup', '--show', '--find', info.loopback_file]
[info.bootstrap_device['path']] = log_check_call(command)
class Detach(Task):