diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-12-18 12:56:07 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-12-18 12:56:07 +0000 |
commit | c5038957b359638890e0190efdb0c1d6b6e18197 (patch) | |
tree | 8fa3640cfb78db51bc9cf1ad7d5409b50cefc297 | |
parent | d6023583aab3508d2f3eea891bd8d37bc6746dd6 (diff) | |
download | drakiso-c5038957b359638890e0190efdb0c1d6b6e18197.tar drakiso-c5038957b359638890e0190efdb0c1d6b6e18197.tar.gz drakiso-c5038957b359638890e0190efdb0c1d6b6e18197.tar.bz2 drakiso-c5038957b359638890e0190efdb0c1d6b6e18197.tar.xz drakiso-c5038957b359638890e0190efdb0c1d6b6e18197.zip |
add image size in images list for cdrom replicator too
-rwxr-xr-x | draklive | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1261,6 +1261,13 @@ sub get_disk_replicator_files { get_rescue_files($live, $live->{replicator}, [ get_disk_image_path($live) => '/images/' ]); } +sub get_disk_replicator_images_list { + my ($live) = @_; + my $master_path = get_disk_master_path($live); + my $master_size = (stat($master_path))[7]; + "EN,English," . basename(get_disk_image_path($live)) . ",on,$master_size\n"; +} + sub create_usb_replicator { my ($live, $opts) = @_; my %files = get_disk_replicator_files($live); @@ -1298,10 +1305,7 @@ sub record_usb_replicator { } record_rescue_files($live->{mnt}, $slash->{real_device}, [ get_disk_replicator_files($live) ]); - - my $master_path = get_disk_master_path($live); - my $master_size = (stat($master_path))[7]; - output_p($live->{mnt} . "/images/list", "EN,English," . basename(get_disk_image_path($live)) . ",on,$master_size\n"); + output_p($live->{mnt} . "/images/list", get_disk_replicator_images_list($live)); run_('umount', $slash->{real_device}); maybe_umount_device($slash->{real_device}); @@ -1313,7 +1317,7 @@ sub create_cdrom_replicator { # FIXME: factorize with usb replicator, write in builddir/replicator/images-list my $images_list = "/tmp/images-replicator.list"; - output_p($images_list, "EN,English," . basename(get_disk_image_path($live)) . ",on\n"); + output_p($images_list, get_disk_replicator_images_list($live)); # FIXME: write in builddir/replicator/syslinux.cfg my $syslinux_cfg = "/tmp/syslinux-replicator.cfg"; |