From bddb76217619838f984ae2ba9fbfb434efed9ffd Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 14 Feb 2008 16:25:34 +0000 Subject: - diskdrake: o final fix for resizing's failures due to udev's race (when writing the partition, do not del/add the same partition) --- perl-install/partition_table.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/partition_table.pm') diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 7fec13559..dd4a295f0 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -378,7 +378,9 @@ sub tell_kernel { my $force_reboot = any { $_->[0] eq 'force_reboot' } @$tell_kernel; if (!$force_reboot) { - foreach (@$tell_kernel) { + # only keep the last action on the partition number + # that way we do not del/add the same partition, and this helps udev :) + foreach (reverse(uniq_ { $_->[1] } reverse @$tell_kernel)) { my ($action, $part_number, $o_start, $o_size) = @$_; if ($action eq 'add') { -- cgit v1.2.1