From 4663d4d881b76120f6e0e140a981c82044385ac9 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 26 Oct 2004 08:52:39 +0000 Subject: in upgrade, when we need to migrate device names, we must write the fstab --- perl-install/install_any.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perl-install/install_any.pm') 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 = ( -- cgit v1.2.1