From ddf3954a198c6f0ca8c3e3e1587a844caf945a55 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 13 Sep 2005 10:49:26 +0000 Subject: when upgrading by removing pkgs, ensure we keep the previous runlevel --- perl-install/install_steps.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'perl-install/install_steps.pm') diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index ce734461b..8a731e6df 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -571,6 +571,13 @@ EOF renamef(pkgs::removed_pkgs_to_upgrade_file(), pkgs::removed_pkgs_to_upgrade_file() . '.done'); unlink(glob("$::prefix/root/drakx/*.upgrading")); + if ($o->{upgrade_by_removing_pkgs_matching}) { + if (cat_("$::prefix/etc/inittab.rpmsave") =~ /^id:(\d):initdefault:\s*$/m) { + $o->{X}{xdm} = $1; + log::l("runlevel is $o->{X}{xdm} (as found in previous inittab)"); + } + } + any::fix_broken_alternatives($o->{isUpgrade} eq 'redhat'); #- update theme directly from a package (simplest). -- cgit v1.2.1