summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-02 21:45:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-02 21:45:04 +0000
commitb707231329f40f0537da5a7a8a6033cf8bb8fbf5 (patch)
tree259609acdea36e2678111f5ecea195d202c58bdb /perl-install/install_steps.pm
parentdba903b20c5e9d89e6dbda4e37d8c87f3b6a4562 (diff)
downloaddrakx-b707231329f40f0537da5a7a8a6033cf8bb8fbf5.tar
drakx-b707231329f40f0537da5a7a8a6033cf8bb8fbf5.tar.gz
drakx-b707231329f40f0537da5a7a8a6033cf8bb8fbf5.tar.bz2
drakx-b707231329f40f0537da5a7a8a6033cf8bb8fbf5.tar.xz
drakx-b707231329f40f0537da5a7a8a6033cf8bb8fbf5.zip
no_comment
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm26
1 files changed, 20 insertions, 6 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 141cb42c9..9198279c3 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -184,6 +184,11 @@ sub choosePackages($$$$) {
sub beforeInstallPackages {
my ($o) = @_;
+ $o->{bootloader}{perImageAppend} .= " " . join(" ", grep { /^ide/ } split ' ', cat_("/proc/cmdline"));
+ if (my @l = detect_devices::getIDEBurners()) {
+ $o->{bootloader}{perImageAppend} .= " " . join(" ", map { "$_=ide-scsi" } @l);
+ }
+
network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1");
require pkgs;
pkgs::init_db($o->{prefix}, $o->{isUpgrade});
@@ -454,13 +459,14 @@ sub addUser($) {
if (!$_->{name} || getpwnam($_->{name}) || $done{$_->{name}}) {
0;
} else {
+ $_->{home} ||= "/home/$_->{name}";
+
my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]);
my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]);
#- search for available uid above 501 else initscripts may fail to change language for KDE.
if (!$u || getpwuid($u)) { for ($u = 501; getpwuid($u) || $uids{$u}; $u++) {} }
if (!$g || getgrgid($g)) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} }
- $_->{home} ||= "/home/$_->{name}";
$_->{uid} = $u; $uids{$u} = 1;
$_->{gid} = $g; $gids{$g} = 1;
$_->{pw} ||= $_->{password} && install_any::crypt($_->{password});
@@ -507,7 +513,7 @@ sub createBootdisk($) {
return if $::testing;
require lilo;
- lilo::mkbootdisk($o->{prefix}, install_any::kernelVersion(), $dev);
+ lilo::mkbootdisk($o->{prefix}, install_any::kernelVersion(), $dev, $o->{bootloader}{perImageAppend});
$o->{mkbootdisk} = $dev;
}
@@ -544,10 +550,6 @@ sub readBootloaderConfigBeforeInstall {
sub setupBootloaderBefore {
my ($o) = @_;
- $o->{bootloader}{perImageAppend} .= " " . join(" ", grep { /^ide/ } split ' ', cat_("/proc/cmdline"));
- if (my $ramsize = $o->{miscellaneous}{memsize} && $o->{bootloader}{perImageAppend} !~ /mem=/) {
- $o->{bootloader}{perImageAppend} .= " mem=$ramsize";
- }
require lilo;
lilo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion());
$o->{bootloader}{keytable} ||= keyboard::keyboard2kmap($o->{keyboard});
@@ -621,6 +623,18 @@ sub miscellaneous {
cat_("/proc/cmdline") =~ /mem=(\S+)/;
add2hash_($o->{miscellaneous} ||= {}, { numlock => !$o->{pcmcia}, $1 ? (memsize => $1) : () });
+
+ local $_ = $o->{bootloader}{perImageAppend};
+ if (my $ramsize = $o->{miscellaneous}{memsize} and !/mem=/) {
+ $_ .= " mem=$ramsize";
+ }
+ if (my @l = detect_devices::getIDEBurners() and !/ide-scsi/) {
+ $_ .= " " . join(" ", map { "$_=ide-scsi" } @l);
+ }
+ #- keep some given parameters
+ $_ .= " " . join(" ", grep { /^ide/ } split ' ', cat_("/proc/cmdline")) unless /ide.=/;
+
+ $o->{bootloader}{perImageAppend} = $_;
}
#------------------------------------------------------------------------------