From 29cea5264614f7bbfd0e652d764486ba4bb8c255 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 23 Oct 2009 13:08:36 +0000 Subject: set_part_real_device for partitions without mountpoint too (so that we can set label on swap later) --- draklive | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/draklive b/draklive index 408924a..0f1ad2a 100755 --- a/draklive +++ b/draklive @@ -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}; -- cgit v1.2.1