diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-12 16:39:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-12 16:39:14 +0000 |
commit | dff746444b3fc778dbf9f818cc3247161548cebe (patch) | |
tree | 557dc643599c3d6a71beecbe82384fd880f4094a | |
parent | 8adabacd95f6a4455027f00084e39958fada6083 (diff) | |
download | drakx-dff746444b3fc778dbf9f818cc3247161548cebe.tar drakx-dff746444b3fc778dbf9f818cc3247161548cebe.tar.gz drakx-dff746444b3fc778dbf9f818cc3247161548cebe.tar.bz2 drakx-dff746444b3fc778dbf9f818cc3247161548cebe.tar.xz drakx-dff746444b3fc778dbf9f818cc3247161548cebe.zip |
no_comment
-rw-r--r-- | perl-install/Xconfigurator.pm | 1 | ||||
-rw-r--r-- | perl-install/any.pm | 11 | ||||
-rw-r--r-- | perl-install/commands.pm | 2 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 6 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 20 | ||||
-rw-r--r-- | perl-install/install_steps_auto_install.pm | 2 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 3 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 5 | ||||
-rw-r--r-- | perl-install/interactive_gtk.pm | 2 | ||||
-rw-r--r-- | perl-install/modules.pm | 93 | ||||
-rw-r--r-- | perl-install/my_gtk.pm | 3 | ||||
-rw-r--r-- | perl-install/network.pm | 4 |
12 files changed, 78 insertions, 74 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index ff9c39491..df1e47ad7 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -461,7 +461,6 @@ sub testFinalConfig($;$$) { $ENV{DISPLAY} = ":9"; - gtkset_mousecursor_normal(); gtkset_background(200 * 257, 210 * 257, 210 * 257); my ($h, $w) = Gtk::Gdk::Window->new_foreign(Gtk::Gdk->ROOT_WINDOW)->get_size; $my_gtk::force_position = [ $w / 3, $h / 2.4 ]; diff --git a/perl-install/any.pm b/perl-install/any.pm index 476b1b2ef..a54cc115e 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -406,20 +406,19 @@ sub miscellaneousNetwork { } sub load_thiskind { - my ($in, $type, $pcmcia) = @_; - my $pcmcia2 = $pcmcia if modules::pcmcia_need_config($pcmcia) && !$::noauto; - my $w; $w = $in->wait_message(_("PCMCIA"), _("Configuring PCMCIA cards...")) if $pcmcia2; - modules::load_thiskind($type, $pcmcia2, sub { $w = wait_load_module($in, $type, @_) }); + my ($in, $type) = @_; + my $w; + modules::load_thiskind($type, sub { $w = wait_load_module($in, $type, @_) }); } sub setup_thiskind { - my ($in, $type, $auto, $at_least_one, $pcmcia) = @_; + my ($in, $type, $auto, $at_least_one) = @_; return if arch() eq "ppc"; my @l; if (!$::noauto) { - @l = load_thiskind($in, $type, $pcmcia); + @l = load_thiskind($in, $type); if (my @err = grep { $_ } map { $_->{error} } @l) { $in->ask_warn('', join("\n", @err)); } diff --git a/perl-install/commands.pm b/perl-install/commands.pm index e9a1b3986..20f2466af 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -510,7 +510,7 @@ sub kill { sub lspci { require detect_devices; - print join "\n", detect_devices::stringlist(@_), ''; + print join "\n", detect_devices::stringlist(), ''; } *lssbus = *lspci; diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 768569bac..414663da3 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -178,17 +178,17 @@ sub hasNetDevice($) { c::hasNetDevice($_[0]) } # get_pcmcia_devices provides field "device", used in network.pm # => probeall with $probe_type is unsafe sub probeall { - my ($probe_type, $pcic) = @_; + my ($probe_type) = @_; require pci_probing::main; require sbus_probing::main; - pci_probing::main::probe($probe_type), sbus_probing::main::probe(), modules::get_pcmcia_devices($pcic); + pci_probing::main::probe($probe_type), sbus_probing::main::probe(), modules::get_pcmcia_devices(); } sub matching_desc { my ($regexp) = @_; grep { $_->{description} =~ /$regexp/i } probeall(); } sub stringlist { - map { " $_->{description} ($_->{type} $_->{driver})" } probeall(1, @_); + map { " $_->{description} ($_->{type} $_->{driver})" } probeall(1); } sub check { my ($l) = @_; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 3d7e35426..573619048 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -117,7 +117,9 @@ sub selectInstallClass($@) { }}{$o->{installClass}}; } #------------------------------------------------------------------------------ -sub setupSCSI { +sub setupSCSI { + my ($o) = @_; + modules::configure_pcmcia($o->{pcmcia}); modules::load_ide(); modules::load_thiskind('scsi|disk'); } @@ -383,7 +385,7 @@ Consoles 1,3,4,7 may also contain interesting information"; sync(); sync(); #- configure PCMCIA services if needed. - $o->pcmciaConfig(); + modules::write_pcmcia($o->{prefix}, $o->{pcmcia}); #- for mandrake_firstime touch "$o->{prefix}/var/lock/TMP_1ST"; @@ -515,20 +517,6 @@ sub installCrypto { } #------------------------------------------------------------------------------ -sub pcmciaConfig($) { - my ($o) = @_; - my $t = $o->{pcmcia}; - - #- should be set after installing the package above else the file will be renamed. - setVarsInSh("$o->{prefix}/etc/sysconfig/pcmcia", { - PCMCIA => $t ? "yes" : "no", - PCIC => $t, - PCIC_OPTS => "", - CORE_OPTS => "", - }); -} - -#------------------------------------------------------------------------------ sub configureTimezone { my ($o, $f) = @_; require timezone; diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm index b7eea5fc2..6f22b2522 100644 --- a/perl-install/install_steps_auto_install.pm +++ b/perl-install/install_steps_auto_install.pm @@ -35,7 +35,7 @@ sub new { sub configureNetwork { my ($o) = @_; - modules::load_thiskind('net', $o->{pcmcia}); + modules::load_thiskind('net'); netconnect::main($o->{prefix}, $o->{netcnx} ||= {}, $o->{netc}, $o->{mouse}, $o, $o->{pcmcia}, $o->{intf}, 1); } diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index a77956aaf..94c52b0ed 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -402,7 +402,7 @@ sub choosePackagesTree { } }; my $children = sub { map { $packages->[0]{($tree->node_get_pixtext($_, 0))[0]} } gtkctree_children($_[0]) }; - my $toggle_ = sub { + my $toggle = sub { if (ref $curr && ! $_[0]) { $tree->toggle_expansion($curr); } else { @@ -438,7 +438,6 @@ sub choosePackagesTree { } } }; - my $toggle = sub { &$toggle_; gtkset_mousecursor_normal() }; $tree->signal_connect(key_press_event => sub { my ($w, $e) = @_; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 653e9ee20..995ba0dae 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -181,6 +181,11 @@ sub selectMouse { #------------------------------------------------------------------------------ sub setupSCSI { my ($o) = @_; + + if ($o->{pcmcia} && !$::noauto) { + my $w = $o->wait_message(_("PCMCIA"), _("Configuring PCMCIA cards...")); + modules::configure_pcmcia($o->{pcmcia}); + } { my $w = $o->wait_message(_("IDE"), _("Configuring IDE")); modules::load_ide(); diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 9af288df0..a822be75b 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -20,7 +20,7 @@ sub suspend { my ($o) = @_; $o->{suspended} = common::setVirtual(1) } sub resume { my ($o) = @_; common::setVirtual(delete $o->{suspended}) } sub exit { - gtkset_mousecursor_normal(); + gtkset_mousecursor_normal(); #- for restoring a normal in any case on standalone c::_exit($_[0]) #- workaround } diff --git a/perl-install/modules.pm b/perl-install/modules.pm index d2b1c7684..3450d8e53 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -30,7 +30,7 @@ arch() =~ /^sparc/ ? ( "3c90x" => "3Com 3c90x (Cyclone/Hurricane/Tornado)", "at1700" => "Allied Telesis AT1700", "ac3200" => "Ansel Communication AC3200", -#BIG "acenic" => "AceNIC Gigabit Ethernet", + "acenic" => "AceNIC Gigabit Ethernet", "pcnet32" => "AMD PC/Net 32", "82596" => "Apricot 82596", # "atp" => "ATP", # builtin the kernel @@ -82,13 +82,13 @@ arch() =~ /^sparc/ ? ( "sb1000" => "sb1000", "sbni" => "sbni", "sis900" => "sis900", -#BIG "sk98lin" => "Syskonnect (Schneider & Koch)|Gigabit Ethernet", + "sk98lin" => "Syskonnect (Schneider & Koch)|Gigabit Ethernet", ), "3c59x" => "3com 3c59x (Vortex)", -#BIG "de4x5" => "Digital 425,434,435,450,500", + "de4x5" => "Digital 425,434,435,450,500", "rtl8139" => "RealTek RTL8129/8139", }], -[ 'network', { +[ 'net_raw', { "8390" => "8390", "af_packet" => "packet socket", "nfs" => "Network File System (nfs)", @@ -153,15 +153,15 @@ arch() =~ /^sparc/ ? ( "pluto" => "Sun SparcSTORAGE Array SCSI", #- name it "fc4:soc:pluto" ? ) : arch() =~ /alpha/ ? () : ( "DAC960" => "Mylex DAC960", -#unused "dpt_i2o" => "Distributed Tech SmartCache/Raid I-IV Controller", # not there anymore? + "dpt_i2o" => "Distributed Tech SmartCache/Raid I-IV Controller", # not there anymore? "megaraid" => "AMI MegaRAID", "aacraid" => "AACxxx Raid Controller", "cpqarray" => "Compaq Smart-2/P RAID Controller", "gdth" => "ICP Disk Array Controller", "ips" => "IBM ServeRAID controller", -#unused "eata" => "EATA SCSI PM2x24/PM3224", -#unused "eata_pio" => "EATA PIO Adapters", -#unused "eata_dma" => "EATA DMA Adapters", + "eata" => "EATA SCSI PM2x24/PM3224", + "eata_pio" => "EATA PIO Adapters", + "eata_dma" => "EATA DMA Adapters", "ppa" => "Iomega PPA3 (parallel port Zip)", "imm" => "Iomega Zip (new driver)", ), @@ -237,7 +237,7 @@ arch() !~ /^sparc/ ? ( "3c589_cs" => "3c589_cs", "parport_cs" => "parport_cs", "3c575_cb" => "3c575_cb", -#unused "apa1480_cb" => "apa1480_cb", + "apa1480_cb" => "apa1480_cb", "cb_enabler" => "cb_enabler", "epic_cb" => "epic_cb", "iflash2+_mtd" => "iflash2+_mtd", @@ -540,7 +540,8 @@ sub write_conf { } } my @l = map { "scsi_hostadapter$_\n" } '', 1..$scsi-1 if $scsi; - push @l, "ide-floppy" if detect_devices::ide_zips(); + push @l, 'ide-floppy' if detect_devices::ide_zips(); + push @l, 'bttv' if grep { $_->{driver} eq 'bttv' } detect_devices::probeall(); log::l("to put in modules @l"); substInFile { @@ -562,7 +563,7 @@ sub read_stage1_conf { } sub load_thiskind { - my ($type, $pcic, $f) = @_; + my ($type, $f) = @_; grep { $f->($_->{description}, $_->{driver}) if $f; @@ -570,49 +571,57 @@ sub load_thiskind { $_->{error} = $@; !($@ && $_->{try}); - } get_that_type($type, $pcic), + } get_that_type($type), $type =~ /scsi/ && arch() !~ /sparc/ ? (map { +{ driver => $_, description => $_, try => 1 } } detect_devices::hasUsbZip() ? "usb-storage" : (), "imm", "ppa") : (); } sub get_that_type { - my ($type, $pcic) = @_; + my ($type) = @_; grep { my $l = $drivers{$_->{driver}}; $l && $l->{type} =~ /$type/ && detect_devices::check($_); - } detect_devices::probeall('', $pcic); + } detect_devices::probeall(''); } -sub pcmcia_need_config($) { - return $_[0] && ! -s "/var/run/stab"; +sub load_ide { + eval { + load("ide-mod", 'prereq', 'options="' . detect_devices::hasUltra66() . '"'); + delete $conf{"ide-mod"}{options}; + load_multi(qw(ide-probe ide-probe-mod ide-disk ide-cd)); + } + } -sub get_pcmcia_devices($$) { +sub configure_pcmcia { my ($pcic) = @_; - my (@devs, $desc); #- try to setup pcmcia if cardmgr is not running. - if (pcmcia_need_config($pcic)) { - log::l("i try to configure pcmcia services"); + -s "/var/run/stab" and return; - symlink("/tmp/stage2/etc/pcmcia", "/etc/pcmcia") unless -e "/etc/pcmcia"; - symlink("/sbin/install", "/sbin/cardmgr") unless -x "/sbin/cardmgr"; + log::l("i try to configure pcmcia services"); - eval { - load("pcmcia_core"); - load($pcic); - load("ds"); - }; + symlink("/tmp/stage2/etc/pcmcia", "/etc/pcmcia") unless -e "/etc/pcmcia"; + symlink("/sbin/install", "/sbin/cardmgr") unless -x "/sbin/cardmgr"; - #- run cardmgr in foreground while it is configuring the card. - run_program::run("cardmgr", "-f", "-m" ,"/modules"); - sleep(3); + eval { + load("pcmcia_core"); + load($pcic); + load("ds"); + }; + + #- run cardmgr in foreground while it is configuring the card. + run_program::run("cardmgr", "-f", "-m" ,"/modules"); + sleep(3); + + #- make sure to be aware of loaded module by cardmgr. + read_already_loaded(); +} - #- make sure to be aware of loaded module by cardmgr. - read_already_loaded(); - } +sub get_pcmcia_devices { + my (@devs, $desc); foreach (cat_("/var/run/stab")) { $desc = $1 if /^Socket\s+\d+:\s+(.*)/; @@ -622,14 +631,18 @@ sub get_pcmcia_devices($$) { @devs; } -sub load_ide { - eval { - load("ide-mod", 'prereq', 'options="' . detect_devices::hasUltra66() . '"'); - delete $conf{"ide-mod"}{options}; - load_multi(qw(ide-probe ide-probe-mod ide-disk ide-cd)); - } +sub write_pcmcia { + my ($prefix, $pcmcia) = @_; + #- should be set after installing the package above otherwise the file will be renamed. + setVarsInSh("$prefix/etc/sysconfig/pcmcia", { + PCMCIA => bool2yesno($pcmcia), + PCIC => $pcmcia, + PCIC_OPTS => "", + CORE_OPTS => "", + }); } -1; + +1; diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 4d4fdfc43..0dd9f90f2 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -45,11 +45,12 @@ sub new { sub main($;$) { my ($o, $f) = @_; gtkset_mousecursor_normal(); + my $idle = Gtk->timeout_add(1000, sub { gtkset_mousecursor_normal() }); $o->show; do { local $::setstep = 1; - Gtk->main + Gtk->main; } while ($o->{retval} && $f && !&$f()); $o->destroy; $o->{retval} diff --git a/perl-install/network.pm b/perl-install/network.pm index 0c3466bec..1922c21b7 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -244,9 +244,9 @@ sub gateway { } sub configureNetwork { - my ($prefix, $netc, $in, $pcmcia, $intf, $first_time) = @_; + my ($prefix, $netc, $in, $intf, $first_time) = @_; local $_; - any::setup_thiskind($in, 'net', !$::expert, 1, $pcmcia); + any::setup_thiskind($in, 'net', !$::expert, 1); my @l = detect_devices::getNet() or die _("no network card found"); my $last; foreach ($::beginner ? $l[0] : @l) { |