diff options
Diffstat (limited to 'draklive')
-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); |