From b5d4cd86a5503006ed8308c9c6825187e180757a Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 9 Jun 2015 21:37:06 +0200 Subject: prevent errors when telling kernel to reread parts disk_{add,del}_partition call ped_disk_commit() which result in udev events (and also already tell the kernel to reread the partition table (several times)) --- perl-install/partition_table/gpt.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'perl-install/partition_table') diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index d07b634d0..4a277f7b6 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -182,6 +182,9 @@ sub write { c::disk_del_partition($hd->{file}, $part_number) or die "failed to del partition #$part_number on $hd->{file}"; } } + # prevent errors when telling kernel to reread partition table: + # (above add/del_partition result in udev events) + system(qw(udevadm settle)); common::sync(); 1; } -- cgit v1.2.1