summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-07 13:53:02 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-07 13:53:02 +0000
commit3e881183d59b7fe80b703dfa269851e3cbf35302 (patch)
treeb22428f4a80e2735a43fe64e141fe3ad6bf72bb1 /perl-install/install_any.pm
parent47e95567a695046e6ca3b6020345f71f400e2102 (diff)
downloaddrakx-3e881183d59b7fe80b703dfa269851e3cbf35302.tar
drakx-3e881183d59b7fe80b703dfa269851e3cbf35302.tar.gz
drakx-3e881183d59b7fe80b703dfa269851e3cbf35302.tar.bz2
drakx-3e881183d59b7fe80b703dfa269851e3cbf35302.tar.xz
drakx-3e881183d59b7fe80b703dfa269851e3cbf35302.zip
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 09a602a7c..f8d07560e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -340,12 +340,20 @@ sub killCardServices {
$pid and kill(15, $pid); #- send SIGTERM
}
+sub hdInstallPath() {
+ cat_("/proc/mounts") =~ m|/tmp/(\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/rhimage") =~ m|^/tmp/hdimage/(.*)|);
+}
+
sub unlockCdrom() {
- cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage|;
+ cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage| or return;
eval { ioctl detect_devices::tryOpen($1), c::CDROM_LOCKDOOR(), 0 };
}
sub ejectCdrom() {
- cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage|;
+ cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage| or return;
my $f = eval { detect_devices::tryOpen($1) } or return;
getFile("XXX"); #- close still opened filehandle
eval { fs::umount("/tmp/rhimage") };
@@ -401,7 +409,7 @@ sub g_auto_install(;$) {
my @fields = qw(mntpoint type size);
$o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
- exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem); #- TODO modules bootloader
+ exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount); #- TODO modules bootloader
if (my $card = $::o->{X}{card}) {
$o->{X}{card}{$_} = $card->{$_} foreach qw(default_depth);
@@ -486,6 +494,7 @@ sub install_urpmi {
open LIST, ">$prefix/etc/urpmi/list.$name" or log::l("failed to write list.$name"), return;
my $dir = ${{ nfs => "file://mnt/nfs",
+ hd => "file:/" . hdInstallPath,
ftp => $ENV{URLPREFIX},
http => $ENV{URLPREFIX},
cdrom => "removable_cdrom_1://mnt/cdrom" }}{$method};