From 19a10e98f556ee3ce47831364ae45c044329b45f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 9 Aug 2004 03:05:53 +0000 Subject: - adapt prototype of runlevel() to its use - bootloader::read() needs fstab --- perl-install/Xconfig/various.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Xconfig/various.pm b/perl-install/Xconfig/various.pm index 3a961aa7d..25e04e87a 100644 --- a/perl-install/Xconfig/various.pm +++ b/perl-install/Xconfig/various.pm @@ -53,11 +53,11 @@ sub various { } sub runlevel { - my ($runlevel) = @_; + my ($o_runlevel) = @_; my $f = "$::prefix/etc/inittab"; -r $f or log::l("missing inittab!!!"), return; - if ($runlevel) { - substInFile { s/^id:\d:initdefault:\s*$/id:$runlevel:initdefault:\n/ } $f if !$::testing; + if ($o_runlevel) { + substInFile { s/^id:\d:initdefault:\s*$/id:$o_runlevel:initdefault:\n/ } $f if !$::testing; } else { cat_($f) =~ /^id:(\d):initdefault:\s*$/m && $1; } @@ -131,9 +131,8 @@ sub configure_FB_TVOUT { require bootloader; require fsedit; require detect_devices; - my ($bootloader, $all_hds) = - $::isInstall ? ($::o->{bootloader}, $::o->{all_hds}) : - (bootloader::read(), fsedit::get_hds()); + my $all_hds = $::isInstall ? $::o->{all_hds} : fsedit::get_hds(); + my $bootloader = $::isInstall ? $::o->{bootloader} : bootloader::read(fs::get::fstab($all_hds)); if (my $tvout = bootloader::duplicate_kernel_entry($bootloader, 'TVout')) { $tvout->{append} .= " XFree=tvout"; -- cgit v1.2.1