summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm75
1 files changed, 6 insertions, 69 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index f9f04da84..08db3ef9a 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -43,11 +43,10 @@ sub changeMedium($$) {
}
sub relGetFile($) {
local $_ = $_[0];
+ m|^Mandrake/| and return $_;
/\.img$/ and return "images/$_";
my $dir = m|/| ? "mdkinst" : /^(?:compss|compssList|compssUsers|depslist.*|hdlist.*)$/ ? "base/": "RPMS$asked_medium/";
- $_ = "Mandrake/$dir$_";
- #- s/i386/i586/; avoid using such thing as package have to be correctly rebuild
- $_;
+ "Mandrake/$dir$_";
}
sub errorOpeningFile($;$) {
my ($file, $absent) = @_;
@@ -515,14 +514,13 @@ sub loadO {
};
$o = loadO($O, $f);
} else {
- -e $f or $f .= ".pl";
- {
- local *F;
- open F, $f or die _("Error reading file $f");
+ -e "$f.pl" and $f .= ".pl" unless -e $f;
+ my $fh = -e $f ? do { local *F; open F, $f; *F } : getFile($f) or die _("Error reading file $f");
+ {
local $/ = "\0";
no strict;
- eval <F>;
+ eval <$fh>;
$@ and log::l("Bad kickstart file $f (failed $@)");
}
add2hash_($o ||= {}, $O);
@@ -753,66 +751,5 @@ sub move_desktop_file($) {
}
}
-sub ultra66 {
- my ($o) = @_;
-
- if (cat_("/proc/cmdline") !~ /ide2=/) {
- require pci_probing::main;
- my @l = map { $_->[0] } grep { $_->[1] =~ /(HPT|Ultra66)/ } pci_probing::main::probe('STORAGE_OTHER', 'more');
- if (@l && $o->ask_yesorno('',
-_("Linux does not yet fully support ultra dma 66.
-As a work-around i can make a custom floppy giving access the hard drive on ide2 and ide3"), 1)) {
- log::l("HPT|Ultra66: found");
- my $ide = sprintf "ide2=0x%x,0x%x ide3=0x%x,0x%x",
- map_index { hex($_) + (odd($::i) ? 1 : -1) } do {
- if (@l == 2) {
- map { (split ' ')[3..4] } @l
- } else {
- map { (split ' ')[3..6] } @l
- }
- };
- log::l("HPT|Ultra66: gonna add ($ide)");
-
- my $dev = devices::make("fd0");
- my $image = $o->{pcmcia} ? "pcmcia" :
- ${{ hd => 'hd', cdrom => 'cdrom',
- ftp => 'network', nfs => 'network', http => 'network' }}{$o->{method}};
-
- my $nb_try;
- for ($nb_try = 0; $nb_try <= 1; $nb_try++) {
- eval { fs::mount($dev, "/floppy", "vfat", 0) };
- last if !$@ && -e "/floppy/syslinux.cfg";
-
- eval { fs::umount("/floppy") };
- $o->ask_warn('',
-_("Enter a floppy to create an HTP enabled boot
-(all data on floppy will be lost)"));
- if (my $fd = getFile("$image.img")) {
- my $w = $o->wait_message('', _("Creating bootdisk"));
- local *OUT;
- open OUT, ">$dev" or log::l("failed to write $dev"), return;
- local $/ = \ (16 * 1024);
- print OUT foreach <$fd>;
- }
- }
- if (-e "/floppy/syslinux.cfg") {
- log::l("HTP: modifying syslinux.cfg");
- substInFile { s/(?=$)/ $ide/ if /^\s*append\s/ } "/floppy/syslinux.cfg";
- fs::umount("/floppy");
- log::l("HPT|Ultra66: all done");
-
- $o->ask_warn('', $nb_try ?
- _("It is necessary to restart installation booting on the floppy") :
- _("It is necessary to restart installation with the new parameters"));
- install_steps::rebootNeeded ($o);
- } else {
- $o->ask_warn('',
-_("Failed to create an HTP boot floppy.
-You may have to restart installation and give ``%s'' at the prompt", $ide));
- }
- }
- }
-}
-
1;