diff options
author | Francois Pons <fpons@mandriva.com> | 2001-08-24 12:44:23 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-08-24 12:44:23 +0000 |
commit | 12646c6a527a5499747f5d89bbfecc9b74f296b6 (patch) | |
tree | 54d69b17560c80cf8557ddd8c2f567127eb874b4 /perl-install/install_any.pm | |
parent | b38e40057b5d8a22c230520b54b37fd74d6f9933 (diff) | |
download | drakx-backup-do-not-use-12646c6a527a5499747f5d89bbfecc9b74f296b6.tar drakx-backup-do-not-use-12646c6a527a5499747f5d89bbfecc9b74f296b6.tar.gz drakx-backup-do-not-use-12646c6a527a5499747f5d89bbfecc9b74f296b6.tar.bz2 drakx-backup-do-not-use-12646c6a527a5499747f5d89bbfecc9b74f296b6.tar.xz drakx-backup-do-not-use-12646c6a527a5499747f5d89bbfecc9b74f296b6.zip |
removed obsolete code for cond_remount and cond_umount and update hdInstallPath
for hd installation.
Diffstat (limited to 'perl-install/install_any.pm')
-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; |