diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-12-01 08:53:47 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-12-01 08:53:47 +0000 |
commit | 27968886bf2586682cb1a6f45eb8b485dc6a4257 (patch) | |
tree | 8ee761eb8c2fe9067af23fa2d38348284d84ea9f /perl-install/install_any.pm | |
parent | 11c086f6eb07e76fec02c5627072d52b4d6cd7d8 (diff) | |
download | drakx-27968886bf2586682cb1a6f45eb8b485dc6a4257.tar drakx-27968886bf2586682cb1a6f45eb8b485dc6a4257.tar.gz drakx-27968886bf2586682cb1a6f45eb8b485dc6a4257.tar.bz2 drakx-27968886bf2586682cb1a6f45eb8b485dc6a4257.tar.xz drakx-27968886bf2586682cb1a6f45eb8b485dc6a4257.zip |
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 185fa4780..00d869cff 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -22,9 +22,7 @@ use devices; use fsedit; use network; use modules; -use lilo; use detect_devices; -use pkgs; use fs; use log; @@ -43,10 +41,10 @@ sub relGetFile($) { sub getFile($) { local $^W = 0; if ($::o->{method} && $::o->{method} eq "ftp") { - require 'ftp.pm'; + require ftp; *install_any::getFile = \&ftp::getFile; } elsif ($::o->{method} && $::o->{method} eq "http") { - require 'http.pm'; + require http; *install_any::getFile = \&http::getFile; } else { *install_any::getFile = sub($) { @@ -113,6 +111,7 @@ sub getAvailableSpace { sub setPackages($) { my ($o) = @_; + require pkgs; if (is_empty_hash_ref($o->{packages})) { my $useHdlist = $o->{method} !~ /nfs|hd/ || $o->{isUpgrade}; eval { $o->{packages} = pkgs::psUsingHdlist() } if $useHdlist; @@ -120,7 +119,8 @@ sub setPackages($) { push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs"; push @{$o->{default_packages}}, "numlock" if $o->{miscellaneous}{numlock}; - push @{$o->{default_packages}}, "kernel-smp" if detect_devices::hasSMP(); + push @{$o->{default_packages}}, "kernel-secure" if $o->{security} > 3; + push @{$o->{default_packages}}, "kernel-smp" if $o->{security} <= 3 && detect_devices::hasSMP(); #- no need for kernel-smp if we have kernel-secure which is smp push @{$o->{default_packages}}, "kernel-pcmcia-cs" if $o->{pcmcia}; push @{$o->{default_packages}}, "raidtools" if !is_empty_hash_ref($o->{raid}); @@ -152,6 +152,7 @@ sub setPackages($) { sub selectPackagesToUpgrade($) { my ($o) = @_; + require pkgs; pkgs::selectPackagesToUpgrade($o->{packages}, $o->{prefix}, $o->{base}); } @@ -355,33 +356,37 @@ sub setupFB { my ($o, $vga) = @_; #- install needed packages for frame buffer. + require pkgs; pkgs::select($o->{packages}, $o->{packages}{'kernel-fb'}); pkgs::select($o->{packages}, $o->{packages}{'XFree86-FBDev'}); $o->installPackages($o->{packages}); $vga ||= 785; #- assume at least 640x480x16. + require lilo; #- update lilo entries with a new fb label. a bit hack unless #- a frame buffer kernel is used, in such case we use it instead #- with the right mode, nothing more to do. - if ($o->{bootloader}{entries}{'/boot/vmlinuz-smp'}) { - $o->{bootloader}{entries}{'/boot/vmlinuz-smp'}{vga} = $vga; - lilo::install($o->{prefix}, $o->{bootloader}); - } else { - my $root = $o->{bootloader}{entries}{'/boot/vmlinuz'}{root}; - if (lilo::add_kernel($o->{prefix}, $o->{bootloader}, kernelVersion(), 'fb', - { - label => 'linux-fb', - root => $root, - vga => $vga, - })) { - $o->{bootloader}{default} = 'linux-fb'; + foreach (qw(secure smp)) { + if ($o->{bootloader}{entries}{"/boot/vmlinuz-$_"}) { + $o->{bootloader}{entries}{"/boot/vmlinuz-$_"}{vga} = $vga; lilo::install($o->{prefix}, $o->{bootloader}); - } else { - log::l("unable to install kernel with frame buffer support, disabling"); - return 0; + return 1; } } + my $root = $o->{bootloader}{entries}{'/boot/vmlinuz'}{root}; + if (lilo::add_kernel($o->{prefix}, $o->{bootloader}, kernelVersion(), 'fb', + { + label => 'linux-fb', + root => $root, + vga => $vga, + })) { + $o->{bootloader}{default} = 'linux-fb'; + lilo::install($o->{prefix}, $o->{bootloader}); + } else { + log::l("unable to install kernel with frame buffer support, disabling"); + return 0; + } 1; } @@ -396,7 +401,7 @@ sub g_auto_install(;$) { my @fields = qw(mntpoint type size); $o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ]; - exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto); #- TODO modules bootloader + exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem); #- TODO modules bootloader if (my $card = $::o->{X}{card}) { $o->{X}{card}{$_} = $card->{$_} foreach qw(default_depth); @@ -446,6 +451,7 @@ sub loadO { sub pkg_install { my ($o, $name) = @_; + require pkgs; pkgs::select($o->{packages}, $o->{packages}{$name} || die "$name rpm not found"); install_steps::installPackages ($o, $o->{packages}); } |