diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-06-29 13:24:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-06-29 13:24:59 +0000 |
commit | 251095351cd094d0e0a17d3b93c178f573656f17 (patch) | |
tree | b31c6d31e1ccbb6dad1bd8cd4508908f7c7f294c | |
parent | e1946cbdc491a4de7cc40363721be217f798bcf0 (diff) | |
download | drakiso-251095351cd094d0e0a17d3b93c178f573656f17.tar drakiso-251095351cd094d0e0a17d3b93c178f573656f17.tar.gz drakiso-251095351cd094d0e0a17d3b93c178f573656f17.tar.bz2 drakiso-251095351cd094d0e0a17d3b93c178f573656f17.tar.xz drakiso-251095351cd094d0e0a17d3b93c178f573656f17.zip |
introduce more generic get_rescue_files, to build any rescue-based partition
-rwxr-xr-x | draklive | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1046,20 +1046,25 @@ sub get_disk_replicator_path { $live->get_builddir . $live->{prefix}{build}{dist} . '/' . $live->get_name . '.rest.img'; } -sub get_disk_replicator_files { - my ($live) = @_; +sub get_rescue_files { + my ($live, $rescue_opts, $extra_files) = @_; my $media_boot = $live->get_media_prefix('boot'); - my $initrd = $media_boot . $live->{replicator}{media}->get_initrd_path; + my $initrd = $media_boot . $rescue_opts->{media}->get_initrd_path; ( '/usr/lib/drakx-installer-images/isolinux/alt0/vmlinuz' => $media_boot . '/vmlinuz', '/usr/lib/drakx-installer-images/isolinux/alt0/all.rdz' => $initrd, '/usr/lib/drakx-installer-rescue/rescue.sqfs' => '/install/stage2/', - get_disk_image_path($live) => '/images/', + @{$extra_files || []}, #- FIXME: factorize with copy_files_to to handle glob - (map { $live->{settings}{config_root} . '/' . $_->[0] => '/' . $_->[1] } @{$live->{replicator}{files} || []}), + (map { $live->{settings}{config_root} . '/' . $_->[0] => '/' . $_->[1] } @{$rescue_opts->{files} || []}), ); } +sub get_disk_replicator_files { + my ($live) = @_; + get_rescue_files($live, $live->{replicator}, [ get_disk_image_path($live) => '/images/' ]); +} + sub create_usb_replicator { my ($live) = @_; my $dest = get_disk_replicator_path($live); |