Change --make-pxe-live --no-virt use a fsimage

Instead of a partitioned disk image. This will allow a single pass
of lmc to be used to create an ostree live PXE image.
This commit is contained in:
Brian C. Lane 2016-04-21 10:38:29 -07:00
parent b72b41e690
commit efb0cce9b8
1 changed files with 3 additions and 3 deletions

View File

@ -717,7 +717,7 @@ def novirt_install(opts, disk_img, disk_size):
if opts.armplatform:
args += ["--armplatform", opts.armplatform]
if opts.make_iso or opts.make_fsimage:
if opts.make_iso or opts.make_fsimage or opts.make_pxe_live:
# Make a blank fs image
args += ["--dirinstall"]
@ -783,7 +783,7 @@ def novirt_install(opts, disk_img, disk_size):
shutil.copy2(l, log_anaconda)
os.unlink(l)
if not opts.make_iso and not opts.make_fsimage:
if not opts.make_iso and not opts.make_fsimage and not opts.make_pxe_live:
dm_name = os.path.splitext(os.path.basename(disk_img))[0]
dm_path = "/dev/mapper/"+dm_name
if os.path.exists(dm_path):
@ -1389,7 +1389,7 @@ def main():
work_dir = tempfile.mkdtemp(prefix="lmc-work-")
log.info("working dir is %s", work_dir)
if opts.fs_image and not opts.disk_image:
if opts.fs_image or opts.no_virt:
# Create pxe live images from a filesystem image
disk_img = opts.fs_image or disk_img
with Mount(disk_img, opts="loop") as mnt_dir: