summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2010-05-10 14:25:50 +0000
committerPascal Terjan <pterjan@mandriva.org>2010-05-10 14:25:50 +0000
commitde612337a5fedd3619346b2634f00abbed82dc90 (patch)
treed7e2763af7bfa3ffd9dca679aee547cef831af3e
parentece499252d34f5b9500ef2509ff4c2db7076f4bd (diff)
downloaddrakx-de612337a5fedd3619346b2634f00abbed82dc90.tar
drakx-de612337a5fedd3619346b2634f00abbed82dc90.tar.gz
drakx-de612337a5fedd3619346b2634f00abbed82dc90.tar.bz2
drakx-de612337a5fedd3619346b2634f00abbed82dc90.tar.xz
drakx-de612337a5fedd3619346b2634f00abbed82dc90.zip
diskdrake: don't ask to reboot after resize if not needed
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/partition_table.pm10
2 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index d027b26f9..387fed8e2 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- diskdrake:
+ o don't ask to reboot after resize if not needed
+
Version 13.24 - 9 May 2010
- devices:
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index d67508384..cb79ea2f3 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -384,11 +384,11 @@ sub tell_kernel {
my $F = partition_table::raw::openit($hd);
+ run_program::run('udevadm', 'control', '--stop-exec-queue') unless $::isInstall;
+
my $force_reboot = any { $_->[0] eq 'force_reboot' } @$tell_kernel;
if (!$force_reboot) {
- # 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)) {
+ foreach (@$tell_kernel) {
my ($action, $part_number, $o_start, $o_size) = @$_;
if ($action eq 'add') {
@@ -399,7 +399,11 @@ sub tell_kernel {
log::l("tell kernel $action ($hd->{device} $part_number $o_start $o_size) force_reboot=$force_reboot rebootNeeded=$hd->{rebootNeeded}");
}
}
+
+ run_program::run('udevadm', 'control', '--start-exec-queue') unless $::isInstall;
+
if ($force_reboot) {
+ # FIXME Handle LVM/dmcrypt/RAID
my @magic_parts = grep { $_->{isMounted} && $_->{real_mntpoint} } get_normal_parts($hd);
foreach (@magic_parts) {
syscall_('umount', $_->{real_mntpoint}) or log::l(N("error unmounting %s: %s", $_->{real_mntpoint}, $!));