diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-08-18 05:44:25 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-08-18 05:44:25 +0000 |
commit | 6b69393d2b0c2911f486ca6c0046ccf6e1a3f238 (patch) | |
tree | d0f131da5b1d5ae7f370b0cd3411242eee1a7990 | |
parent | 94f257d030c1fd411ec48e438db18c657cd97e40 (diff) | |
download | drakx-6b69393d2b0c2911f486ca6c0046ccf6e1a3f238.tar drakx-6b69393d2b0c2911f486ca6c0046ccf6e1a3f238.tar.gz drakx-6b69393d2b0c2911f486ca6c0046ccf6e1a3f238.tar.bz2 drakx-6b69393d2b0c2911f486ca6c0046ccf6e1a3f238.tar.xz drakx-6b69393d2b0c2911f486ca6c0046ccf6e1a3f238.zip |
no_comment
-rw-r--r-- | perl-install/detect_devices.pm | 20 | ||||
-rw-r--r-- | perl-install/install2.pm | 1 | ||||
-rw-r--r-- | perl-install/install_any.pm | 8 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 2 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 14 | ||||
-rw-r--r-- | perl-install/modules.pm | 13 | ||||
-rw-r--r-- | perl-install/mouse.pm | 6 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 2 |
8 files changed, 22 insertions, 44 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 54893ade3..a5d15dbd9 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -273,26 +273,6 @@ sub whatPrinterPort() { grep { tryWrite($_)} qw(/dev/lp0 /dev/lp1 /dev/lp2 /dev/usb/lp0); } -sub probeUSB { - require modules; - defined($usb_interface) and return $usb_interface; - arch() =~ /sparc/ and return $usb_interface = ''; - if (($usb_interface) = grep { /usb-/ } map { $_->{driver} } probeall()) { - eval { modules::load($usb_interface, "SERIAL_USB") }; - if ($@) { - $usb_interface = ''; - } else { - eval { - modules::load("usbkbd"); - modules::load("keybdev"); - }; - } - } else { - $usb_interface = ''; - } - $usb_interface; -} - sub probeSerialDevices { #- make sure the device are created before probing. foreach (0..3) { devices::make("/dev/ttyS$_") } diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 9fa20092c..cfa566187 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -609,6 +609,7 @@ sub main { mkdir $o->{prefix}, 0755; #- needed very early for install_steps_gtk + modules::load_thiskind("usb"); eval { ($o->{mouse}, $o->{wacom}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse}; lang::set($o->{lang}) if $o->{lang} ne 'en'; #- mainly for defcfg diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 596f5191a..9655d1834 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -277,7 +277,7 @@ sub setPackages($) { push @{$o->{default_packages}}, "raidtools" if $o->{raid} && !is_empty_array_ref($o->{raid}{raid}); push @{$o->{default_packages}}, "reiserfs-utils" if grep { isReiserfs($_) } @{$o->{fstab}}; push @{$o->{default_packages}}, "cdrecord" if detect_devices::getIDEBurners(); - push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("sound") =~ /^snd-card-/; + push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("snd-slot-0") =~ /^snd-card-/; pkgs::getDeps($o->{prefix}, $o->{packages}); pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1); @@ -617,13 +617,15 @@ sub suggest_mount_points { my $d = $handle->{dir}; my ($mnt) = grep { -e "$d/$l{$_}" } keys %l; $mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$user if -e "$d/.bashrc"; - + $part->{mntpoint} = $mnt; # try to find other mount points via fstab fs::get_mntpoints_from_fstab(\@parts, $d) if $mnt eq '/'; } - $_->{mntpoint} and fsedit::suggest_part($_, $hds) foreach @parts; + $_->{mntpoint} || fsedit::suggest_part($_, $hds) foreach @parts; + + $_->{mntpoint} and log::l("suggest_mount_points: $_->{device} -> $_->{mntpoint}") foreach @parts; } #- mainly for finding the root partitions for upgrade diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index fb7d24f4c..7b2ae7416 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -121,7 +121,7 @@ sub selectInstallClass($@) { #------------------------------------------------------------------------------ sub setupSCSI { modules::load_ide(); - modules::load_thiskind('scsi|raid'); + modules::load_thiskind('scsi|disk'); } #------------------------------------------------------------------------------ sub doPartitionDisksBefore { diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index ca54f9d87..2804f3f19 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -176,7 +176,7 @@ sub setupSCSI { my $w = $o->wait_message(_("IDE"), _("Configuring IDE")); modules::load_ide(); } - install_interactive::setup_thiskind($o, 'scsi|raid', $_[1], $_[2]); + install_interactive::setup_thiskind($o, 'scsi|disk', $_[1], $_[2]); } sub ask_mntpoint_s { @@ -188,19 +188,13 @@ sub ask_mntpoint_s { if (@fstab == 1) { $fstab[0]{mntpoint} = '/'; - } elsif ($::beginner) { - my $e = $o->ask_from_listf('', - _("Please choose a partition to use as your root partition."), - \&partition_table_raw::description, - \@fstab) or return; - (fsedit::get_root($fstab) || {})->{mntpoint} = ''; - $e->{mntpoint} = '/'; } else { + install_any::suggest_mount_points($o->{hds}, $o->{prefix}); $o->ask_from_entries_refH('', _("Choose the mount points"), - { map { partition_table_raw::description($_) => + [ map { partition_table_raw::description($_) => { val => \$_->{mntpoint}, list => [ '', fsedit::suggestions_mntpoint([]) ] } - } @fstab }) or return; + } @fstab ]) or return; } $o->SUPER::ask_mntpoint_s($fstab); } diff --git a/perl-install/modules.pm b/perl-install/modules.pm index facef09c9..5f6de00f8 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -272,12 +272,13 @@ arch() !~ /^sparc/ ? ( "serial" => "serial", "qpmouse" => "qpmouse", "atixlmouse" => "atixlmouse", - - "usb-uhci", "USB (uhci)", - "usb-ohci", "USB (ohci)", - "usb-ohci-hcd", "USB (ohci-hcd)", ) : (), }], +[ 'usb', { + "usb-uhci" => "USB (uhci)", + "usb-ohci" => "USB (ohci)", + "usb-ohci-hcd" => "USB (ohci-hcd)", +}], [ 'fs', { "smbfs" => "Windows SMB", "fat" => "fat", @@ -381,7 +382,6 @@ sub load { -d "/proc/scsi/usb" or return; } if ($type) { - add_alias('usb-interface', $name) if $type =~ /SERIAL_USB/i; add_alias('scsi_hostadapter', $name), load('sd_mod') if $type =~ /scsi/ || $type eq $type_aliases{scsi}; } $conf{$name}{options} = join " ", @options if @options; @@ -532,7 +532,8 @@ sub load_thiskind { !($@ && $_->{try}); } get_that_type($type, $pcic), $type =~ /scsi/ && arch() !~ /sparc/ ? - (map { +{ driver => $_, description => $_, try => 1 } } "usb-storage", "imm", "ppa") : (); + (map { +{ driver => $_, description => $_, try => 1 } } + get_alias("usb-interface") ? "usb-storage" : (), "imm", "ppa") : (); } sub get_that_type { diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 94741db34..30f3eaa31 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -172,12 +172,12 @@ sub detect() { eval { commands::modprobe("serial") }; my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r; - if (detect_devices::probeUSB()) { + if (modules::get_alias("usb-interface")) { eval { modules::load("usbmouse"); modules::load("mousedev"); - }; - sleep(2); + sleep(2); + }; if (!$@ && detect_devices::tryOpen("usbmouse")) { $wacom or modules::unload("serial"); return name2mouse("USB Mouse"), $wacom; diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index d1cfabc0d..1f041140d 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -17,7 +17,7 @@ sub auto_detect { my ($in) = @_; { my $w = $in->wait_message(_("Test ports"), _("Detecting devices...")); - detect_devices::probeUSB() and eval { modules::load("printer"); sleep(1); }; + modules::get_alias("usb-interface") and eval { modules::load("printer"); sleep(1); }; eval { modules::load_multi("parport_pc", "parport_probe", "lp"); }; } my $b = before_leaving { eval { modules::unload("parport_probe") } }; |