diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_any.pm | 29 |
1 files changed, 9 insertions, 20 deletions
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; |