diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-10-09 16:24:45 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-10-09 16:24:45 +0000 |
commit | 9de73575aee5154a98814b830657791537ce9c09 (patch) | |
tree | ad4f6b9f1c7730ed0cea231f08bd3a9657223feb /draklive | |
parent | e961640e59ec2338fe786debc42a990be73e4d6d (diff) | |
download | drakiso-9de73575aee5154a98814b830657791537ce9c09.tar drakiso-9de73575aee5154a98814b830657791537ce9c09.tar.gz drakiso-9de73575aee5154a98814b830657791537ce9c09.tar.bz2 drakiso-9de73575aee5154a98814b830657791537ce9c09.tar.xz drakiso-9de73575aee5154a98814b830657791537ce9c09.zip |
allow to compress master images as gzip instead of bzip2 by setting
compression_method=gzip in settings.cfg (from Paulo Ricardo Zanoni)
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1112,7 +1112,12 @@ sub need_compressed_image { sub get_disk_image_path { my ($live) = @_; - get_disk_master_path($live) . if_(need_compressed_image($live), '.bz2'); + if ($live->{settings}{compression_method} == 'gzip') { + get_disk_master_path($live) . if_(need_compressed_image($live), '.gz'); + } + else { + get_disk_master_path($live) . if_(need_compressed_image($live), '.bz2'); + } } sub create_disk_image { @@ -1124,7 +1129,13 @@ sub create_disk_image { my $master = get_disk_master_path($live); my $dest = get_disk_image_path($live); mkdir_p(dirname($dest)); - run_('bzip2', '>', $dest, '-f', '-k', '-c', $master); + + if ($live->{settings}{compression_method} == 'gzip') { + run_('gzip', '>', $dest, '-f', '-c', '--fast', $master); + } + else { + run_('bzip2', '>', $dest, '-f', '-k', '-c', $master); + } } sub create_image { |