diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-04-12 23:56:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-04-12 23:56:21 +0000 |
commit | 33876d96b93d796507af8dd46be3b9aba579d2b0 (patch) | |
tree | 2a6b030d080434295a126076b4727b891e5667e8 /perl-install/install_any.pm | |
parent | 66b03c87eb3e94bd4eb764d97cd7aaf3ca7f52f9 (diff) | |
download | drakx-backup-do-not-use-33876d96b93d796507af8dd46be3b9aba579d2b0.tar drakx-backup-do-not-use-33876d96b93d796507af8dd46be3b9aba579d2b0.tar.gz drakx-backup-do-not-use-33876d96b93d796507af8dd46be3b9aba579d2b0.tar.bz2 drakx-backup-do-not-use-33876d96b93d796507af8dd46be3b9aba579d2b0.tar.xz drakx-backup-do-not-use-33876d96b93d796507af8dd46be3b9aba579d2b0.zip |
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index d180921bb..507d0b0f1 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -58,7 +58,7 @@ sub changeMedium($$) { } sub relGetFile($) { local $_ = $_[0]; - m|^Mandrake/| and return $_; + m,^(Mandrake|lnx4win)/, and return $_; /\.img$/ and return "images/$_"; my $dir = m|/| ? "mdkinst" : /^(?:compss|compssList|compssUsers|filelist|depslist.*|hdlist.*)$/ ? "base/": "RPMS$asked_medium/"; @@ -127,13 +127,16 @@ sub getFile { } goto &getFile; } -sub rewindGetFile() { - if ($::o->{method} && $::o->{method} eq "ftp") { - require ftp; - ftp::rewindGetFile(); #- make sure to reopen connection. - } +sub getAndSaveFile { + my ($file, $local) = @_; + local *F; open F, ">$local" or return; + local $/ = \ (16 * 1024); + my $f = getFile($file) or return; + syswrite F, $_ foreach <$f>; + 1; } + #-###################################################################################### #- Post installation RPMS from cdrom only, functions #-###################################################################################### @@ -457,25 +460,6 @@ sub crypt($) { crypt ($password, salt(2)); } -sub lnx4win_preinstall { - require swap; - swap::swapon("/dos/lnx4win/swapfile"); #- allow lnx4win to run with a little more memory. -} -sub lnx4win_postinstall { - my ($prefix) = @_; - my $dir = "/dos/lnx4win"; - my $kernel = "$dir/vmlinuz"; - rename $kernel, "$kernel.old"; - commands::dd("if=$prefix/boot/vmlinuz", "of=$kernel"); - run_program::run("rdev", $kernel, "/dev/loop7"); - - unlink "$dir/size.txt"; - unlink "$dir/swapsize.txt"; - - mkdir "$prefix/initrd", 0755; - symlinkf "/initrd/dos", "$prefix/mnt/dos"; -} - sub killCardServices { my $pid = chop_(cat_("/tmp/cardmgr.pid")); $pid and kill(15, $pid); #- send SIGTERM @@ -624,10 +608,9 @@ sub fsck_option() { sub install_urpmi { my ($prefix, $method, $mediums) = @_; - { - local *F = getFile("depslist"); - output("$prefix/var/lib/urpmi/depslist", <F>); - } + + getAndSaveFile("depslist", "$prefix/var/lib/urpmi/depslist"); + my @cfg = map_index { my $name = $_->{fakemedium}; |