From 8ac6dd1291adb70b473c28e235deb038e0f9f099 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 29 Dec 2005 18:12:09 +0000 Subject: name the boot cdrom master as boot.iso (and factorize) --- tools/draklive | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/draklive b/tools/draklive index 75697349d..955d23f27 100755 --- a/tools/draklive +++ b/tools/draklive @@ -540,12 +540,17 @@ live } } +sub get_cdrom_master_path { + my ($live, $media, $opts) = @_; + $live->{workdir} . $live->{prefix}{images} . '/' . ($opts->{boot_only} ? 'boot' : 'live') . '.iso'; +} + sub create_cdrom_master { my ($live, $media, $opts) = @_; my $label = get_media_label($media) or die "the source device must be described by a label"; my @dest; unless ($opts->{onthefly}) { - @dest = ('-o', $live->{workdir} . $live->{prefix}{images} . '/live.iso'); + @dest = ('-o', get_cdrom_master_path($live, $media, $opts)); mkdir_p(dirname($dest[1])); } run_('mkisofs', '-pad', '-l', '-R', '-J', '-v', '-v', @@ -611,7 +616,7 @@ sub format_device { sub record_cdrom_master { my ($live, $media, $opts) = @_; $media->{device} or die "no device defined in media configuration"; - my $src = $opts->{onthefly} ? '-' : $live->{workdir} . $live->{prefix}{images} . '/live.iso'; + my $src = $opts->{onthefly} ? '-' : get_cdrom_master_path($live, $media, $opts); run_('cdrecord', '-v', 'dev=' . $media->{device}, $src); } -- cgit v1.2.1