From 12646c6a527a5499747f5d89bbfecc9b74f296b6 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 24 Aug 2001 12:44:23 +0000 Subject: removed obsolete code for cond_remount and cond_umount and update hdInstallPath for hd installation. --- perl-install/install_any.pm | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'perl-install/install_any.pm') diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index cf5b72379..1d9473d5e 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -461,14 +461,6 @@ sub killCardServices { $pid and kill(15, $pid); #- send SIGTERM } -sub hdInstallPath() { - cat_("/proc/mounts") =~ m|/\w+/(\S+)\s+/tmp/hdimage| or return; - my ($part) = grep { $_->{device} eq $1 } @{$::o->{fstab}}; - $part->{mntpoint} or grep { $_->{mntpoint} eq "/mnt/hd" } @{$::o->{fstab}} and return; - $part->{mntpoint} ||= "/mnt/hd"; - $part->{mntpoint} . first(readlink("/tmp/image") =~ m|^/tmp/hdimage/(.*)|); -} - sub unlockCdrom(;$) { my ($cdrom) = @_; $cdrom or cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image), and $cdrom = $1; @@ -499,9 +491,18 @@ sub setupFB { 1; } +sub hdInstallPath() { + my $tail = first(readlink("/tmp/image") =~ m|^/tmp/hdimage/(.*)|); + my $head = first(readlink("/tmp/hdimage") =~ m|$::o->{prefix}(.*)|); + $tail && "$head/$tail"; +} + sub install_urpmi { my ($prefix, $method, $mediums) = @_; + #- rare case where urpmi cannot be installed (no hd install path). + $method eq 'disk' && !hdInstallPath() and return; + my @cfg = map_index { my $name = $_->{fakemedium}; @@ -1041,18 +1042,6 @@ sub remove_bigseldom_used { ); } -sub cond_umount_hdimage() { - if (cat_("/proc/mounts") =~ m|/\w+/(\S+)\s+/tmp/hdimage\s+(\S+)| && !$::o->{partitioning}{readonly} && common::usingRamdisk()) { - $::o->{stage1_hd} = { device => $1, type => $2 }; - getFile("XXX"); #- close still opened filehandle - eval { fs::umount("/tmp/hdimage") }; - } -} -sub cond_remount_hdimage { - my $s = shift || delete $::o->{stage1_hd} or return; - fs::mount($s->{device}, '/tmp/hdimage', $s->{type}); -} - ################################################################################ package pkgs_interactive; use run_program; -- cgit v1.2.1