summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-09 12:58:55 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-09 12:58:55 +0000
commit5426721c152f6579b403288c2ecb15dab4e20d08 (patch)
tree927a514072269152550052ff93b68394a2fc6958 /perl-install
parent3a1954a1e6e4b0c928b6adbc454718834d55c00d (diff)
downloaddrakx-5426721c152f6579b403288c2ecb15dab4e20d08.tar
drakx-5426721c152f6579b403288c2ecb15dab4e20d08.tar.gz
drakx-5426721c152f6579b403288c2ecb15dab4e20d08.tar.bz2
drakx-5426721c152f6579b403288c2ecb15dab4e20d08.tar.xz
drakx-5426721c152f6579b403288c2ecb15dab4e20d08.zip
fix incomplete prefix for update mirror when adding an entry for urpmi.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/crypto.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index 4d9033e28..a91010ca5 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -126,7 +126,7 @@ sub getPackages {
"Updates for Mandrake Linux 8.1", 1, getFile("base/hdlist.cz", $mirror)) and
log::l("read updates hdlist");
#- keep in mind where is the URL prefix used according to mirror (for install_any::install_urpmi).
- $update_medium->{prefix} = dir($mirror);
+ $update_medium->{prefix} = "ftp://$mirror" . dir($mirror);
return $update_medium;
}
- print F "color black/cyan yellow/cyan";
- print F "serial --unit=$1 --speed=$2\nterminal --timeout=" . ($bootloader->{timeout} || 0) . " console serial" if get_append($bootloader, 'console') =~ /ttyS(\d),(\d+)/;
+ push @grub_config, "color black/cyan yellow/cyan";
+ push @grub_config, "serial --unit=$1 --speed=$2\nterminal --timeout=" . ($bootloader->{timeout} || 0) . " console serial" if get_append($bootloader, 'console') =~ /ttyS(\d),(\d+)/;
each_index {
- print F "default $::i" if $_->{label} eq $bootloader->{default};
+ push @grub_config, "default $::i" if $_->{label} eq $bootloader->{default};
} @{$bootloader->{entries}};
foreach (@{$bootloader->{entries}}) {
- print F "\ntitle $_->{label}";
+ push @grub_config, "\ntitle $_->{label}";
if ($_->{type} eq "image") {
my $vga = $_->{vga} || $bootloader->{vga};
- printf F "kernel %s root=%s %s%s%s\n",
+ push @grub_config, sprintf "kernel %s root=%s %s%s%s",
$file2grub->($_->{kernel_or_dev}),
$_->{root} =~ /loop7/ ? "707" : $_->{root}, #- special to workaround bug in kernel (see #ifdef CONFIG_BLK_DEV_LOOP)
$_->{append},
$_->{'read-write'} && " rw",
$vga && $vga ne "normal" && " vga=$vga";
- print F "initrd ", $file2grub->($_->{initrd}) if $_->{initrd};
+ push @grub_config, join("", "initrd ", $file2grub->($_->{initrd})) if $_->{initrd};
} else {
- print F "root ", dev2grub($_->{kernel_or_dev}, \%dev2bios);
+ push @grub_config, join("", "root ", dev2grub($_->{kernel_or_dev}, \%dev2bios));
if (my ($dev) = $_->{table} =~ m|/dev/(.*)|) {
if ($dev2bios{$dev} =~ /hd([1-9])/) {
@@ -1122,12 +1118,15 @@ sub write_grub_config {
}
}
if ($_->{mapdrive}) {
- map_each { print F "map ($::b) ($::a)" } %{$_->{mapdrive}};
- print F "makeactive";
+ map_each { push @grub_config, "map ($::b) ($::a)" } %{$_->{mapdrive}};
+ push @grub_config, "makeactive";
}
- print F "chainloader +1";
+ push @grub_config, "chainloader +1";
}
}
+ my $f = "$::prefix/boot/grub/menu.lst";
+ log::l("writing grub config to $f");
+ output($f, join("\n", @grub_config));
}
my $dev = dev2grub($bootloader->{boot}, \%dev2bios);
my ($s1, $s2, $m) = map { $file2grub->("/boot/grub/$_") } qw(stage1 stage2 menu.lst);