diff options
Diffstat (limited to 'perl-install/install2.pm')
-rw-r--r-- | perl-install/install2.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 304f4e75a..2ad1297b9 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -162,8 +162,21 @@ sub formatPartitions { $o->{steps}{choosePackages}{done} = 0; installStepsCall($o, $auto, 'choosePartitionsToFormat', $o->{fstab}) if !$o->{isUpgrade}; + my $want_root_formated = fsedit::get_root($o->{fstab})->{toFormat}; + if ($want_root_formated) { + foreach ('/usr') { + my $part = fsedit::mntpoint2part($_, $o->{fstab}) or next; + $part->{toFormat} or die _("You must also format %s", $_); + } + } installStepsCall($o, $auto, 'formatMountPartitions', $o->{fstab}) if !$::testing; + if ($want_root_formated) { + #- we formatted /, ensure /var/lib/rpm is cleaned otherwise bad things can happen + #- (especially when /var is *not* formatted) + eval { rm_rf("$o->{prefix}/var/lib/rpm") }; + } + mkdir "$o->{prefix}/$_", 0755 foreach qw(dev etc etc/profile.d etc/rpm etc/sysconfig etc/sysconfig/console etc/sysconfig/network-scripts etc/sysconfig/console/consolefonts |