summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-10-23 13:08:36 +0000
committerOlivier Blin <oblin@mandriva.com>2009-10-23 13:08:36 +0000
commit29cea5264614f7bbfd0e652d764486ba4bb8c255 (patch)
tree931d020f45fec8b1ed78d8640a928f0ce7a44c76
parent56a851b393db26eee8fa26340a122adc9494d156 (diff)
downloaddraklive-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-xdraklive7
1 files 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};