diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2019-02-03 19:52:49 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2019-02-03 19:52:49 +0000 |
commit | c7082b46f4345ffb061b317785055cdb945289e3 (patch) | |
tree | 310364b8d2d8e7a1ba69080ab8a955e0099e6237 /perl-install/install/steps.pm | |
parent | 045b5965c34ffc1e18d01297f351d8fdb3e72c67 (diff) | |
download | drakx-c7082b46f4345ffb061b317785055cdb945289e3.tar drakx-c7082b46f4345ffb061b317785055cdb945289e3.tar.gz drakx-c7082b46f4345ffb061b317785055cdb945289e3.tar.bz2 drakx-c7082b46f4345ffb061b317785055cdb945289e3.tar.xz drakx-c7082b46f4345ffb061b317785055cdb945289e3.zip |
Skip setupSCSI step when run with --local_install (mga#24278)
In a local install, we don't have udev running, so the setupSCSI step
will hang if it tries to probe for logical volumes (lvm2 uses udev).
A local install is used to test the installer (drakx_in_chroot) and to
build the Live ISOs (draklive2), and in both cases we don't really want
the install to be affected by the hardware of the host system. Skipping
the setupSCSI step means $o->{fstab} contains no entries, so we add a
fake entry for our chroot, to allow us to pass the subsequent check
that we have a root partition.
Diffstat (limited to 'perl-install/install/steps.pm')
-rw-r--r-- | perl-install/install/steps.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm index 91e90e042..5dd31bf62 100644 --- a/perl-install/install/steps.pm +++ b/perl-install/install/steps.pm @@ -194,11 +194,13 @@ sub doPartitionDisksAfter { log::l("fdisk after\n" . any::fdisk()); if ($::local_install) { - my $p = fs::get::mntpoint2part($::prefix, [ fs::read_fstab('', '/proc/mounts') ]); - my $part = find { fs::get::is_same_hd($p, $_) } @{$o->{fstab}}; - $part ||= $o->{fstab}[0]; + #- We skipped the setupSCSI step, so $o->{fstab} will be empty. We need to + #- add a fake entry, to satisfy the following check for a root partition. + my $fstab = [ fs::read_fstab('', '/proc/mounts') ]; + my $part = fs::get::mntpoint2part($::prefix, $fstab) || $fstab[0]; $part->{mntpoint} = '/'; $part->{isMounted} = 1; + $o->{fstab} = [ $part ]; } fs::any::check_hds_boot_and_root($o->{all_hds}, $o->{fstab}, $o->{isUpgrade}, $o->{match_all_hardware}); |