summaryrefslogtreecommitdiffstats
path: root/tools/draklive
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-12-29 18:12:09 +0000
committerOlivier Blin <oblin@mandriva.org>2005-12-29 18:12:09 +0000
commit8ac6dd1291adb70b473c28e235deb038e0f9f099 (patch)
treea96575644a33a5d3d6c2f81c62ba9d29ee72e4ad /tools/draklive
parente1d43df708eec3961b5ebda07db8cda75c313cdb (diff)
downloaddrakx-backup-do-not-use-8ac6dd1291adb70b473c28e235deb038e0f9f099.tar
drakx-backup-do-not-use-8ac6dd1291adb70b473c28e235deb038e0f9f099.tar.gz
drakx-backup-do-not-use-8ac6dd1291adb70b473c28e235deb038e0f9f099.tar.bz2
drakx-backup-do-not-use-8ac6dd1291adb70b473c28e235deb038e0f9f099.tar.xz
drakx-backup-do-not-use-8ac6dd1291adb70b473c28e235deb038e0f9f099.zip
name the boot cdrom master as boot.iso (and factorize)
Diffstat (limited to 'tools/draklive')
-rwxr-xr-xtools/draklive9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/draklive b/tools/draklive
index 75697349d..955d23f27 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -540,12 +540,17 @@ live <kernel options>
}
}
+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);
}