summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-26 08:52:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-26 08:52:39 +0000
commit4663d4d881b76120f6e0e140a981c82044385ac9 (patch)
treed755942e9b42e7847f04fc781cb9470d83ad257c /perl-install/install_any.pm
parent1848925af2ca2cbfaac2bf7de39b007c314a01f7 (diff)
downloaddrakx-4663d4d881b76120f6e0e140a981c82044385ac9.tar
drakx-4663d4d881b76120f6e0e140a981c82044385ac9.tar.gz
drakx-4663d4d881b76120f6e0e140a981c82044385ac9.tar.bz2
drakx-4663d4d881b76120f6e0e140a981c82044385ac9.tar.xz
drakx-4663d4d881b76120f6e0e140a981c82044385ac9.zip
in upgrade, when we need to migrate device names, we must write the fstab
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index eb174f8cb..2ac679a16 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1375,6 +1375,7 @@ sub migrate_device_names {
sub use_root_part {
my ($all_hds, $part, $o_in) = @_;
+ my $migrate_device_names;
{
my $handle = any::inspect($part, $::prefix) or die;
@@ -1382,6 +1383,7 @@ sub use_root_part {
my $root_from_fstab = fs::get::root_(\@from_fstab);
if (!fsedit::is_same_hd($root_from_fstab, $part)) {
+ $migrate_device_names = 1;
log::l("from_fstab contained: $_->{device} $_->{mntpoint}") foreach @from_fstab;
migrate_device_names($all_hds, \@from_fstab, $part, $root_from_fstab, $o_in);
log::l("from_fstab now contains: $_->{device} $_->{mntpoint}") foreach @from_fstab;
@@ -1390,6 +1392,7 @@ sub use_root_part {
log::l("fstab is now: $_->{device} $_->{mntpoint}") foreach fs::get::fstab($all_hds);
}
isSwap($_) and $_->{mntpoint} = 'swap' foreach fs::get::really_all_fstab($all_hds); #- use all available swap.
+ $migrate_device_names;
}
sub getHds {
@@ -1504,7 +1507,7 @@ sub set_security {
sub write_fstab {
my ($o) = @_;
- fs::write_fstab($o->{all_hds}, $o->{prefix}) if !$o->{isUpgrade};
+ fs::write_fstab($o->{all_hds}, $o->{prefix}) if !$o->{isUpgrade} || $o->{migrate_device_names};
}
my @bigseldom_used_groups = (