diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-10-23 13:08:36 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-10-23 13:08:36 +0000 |
commit | 29cea5264614f7bbfd0e652d764486ba4bb8c255 (patch) | |
tree | 931d020f45fec8b1ed78d8640a928f0ce7a44c76 | |
parent | 56a851b393db26eee8fa26340a122adc9494d156 (diff) | |
download | draklive-29cea5264614f7bbfd0e652d764486ba4bb8c255.tar draklive-29cea5264614f7bbfd0e652d764486ba4bb8c255.tar.gz draklive-29cea5264614f7bbfd0e652d764486ba4bb8c255.tar.bz2 draklive-29cea5264614f7bbfd0e652d764486ba4bb8c255.tar.xz draklive-29cea5264614f7bbfd0e652d764486ba4bb8c255.zip |
set_part_real_device for partitions without mountpoint too (so that we can set label on swap later)
-rwxr-xr-x | draklive | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1023,7 +1023,6 @@ sub record_harddisk_master { my $hd = get_hd_from_file($media, $main_device); supplement_media_partitions($media, $hd); - my @partitions = grep { $_->{mntpoint} =~ m!^/! } @{$media->{partitions}}; if (my $label = !$opts->{boot_only} && $media->get_media_label) { my $slash_idx = $media->find_partition_index('/'); @@ -1032,8 +1031,9 @@ sub record_harddisk_master { } mkdir_p($live->{mnt}); - foreach my $part (sort { $a->{mntpoint} cmp $b->{mntpoint} } @partitions) { + foreach my $part (sort { $a->{mntpoint} cmp $b->{mntpoint} } @{$media->{partitions}}) { set_part_real_device($hd, $part); + $_->{mntpoint} =~ m!^/! or next; my $mnt = $live->{mnt} . $part->{mntpoint}; mkdir_p($mnt); run_('mount', $part->{real_device}, $mnt) @@ -1051,7 +1051,8 @@ sub record_harddisk_master { install_grub_to_image($live, $media, $hd->{file}, $opts); - foreach my $part (sort { $b->{mntpoint} cmp $a->{mntpoint} } @partitions) { + foreach my $part (sort { $b->{mntpoint} cmp $a->{mntpoint} } @{$media->{partitions}}) { + $_->{mntpoint} =~ m!^/! or next; run_('umount', $part->{real_device}); maybe_umount_device($part->{real_device}); devices::del_loop($part->{real_device}) if -f $hd->{file}; |