summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-10-06 17:52:58 +0000
committerFrancois Pons <fpons@mandriva.com>1999-10-06 17:52:58 +0000
commitfe224251aa0fe2285b7b1eda762e5b18ddee07a0 (patch)
tree72f80085cb97c05ac1b0f264ae0e1489c4d3e953 /perl-install/modules.pm
parent8f7cb6dae22fc5adc6eb8c57605e16f97cfee179 (diff)
downloaddrakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar.gz
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar.bz2
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar.xz
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.zip
*** empty log message ***
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm28
1 files changed, 23 insertions, 5 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 0b53dfa7a..60ca503b2 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -268,13 +268,13 @@ sub get_stage1_conf {
\%conf;
}
-sub load_thiskind($;&) {
- my ($type, $f) = @_;
+sub load_thiskind($;&$) {
+ my ($type, $f, $pcic) = @_;
my @pcidevs = pci_probing::main::probe($type);
log::l("pci probe found " . scalar @pcidevs . " $type devices");
- my @pcmciadevs = get_pcmcia_devices($type);
+ my @pcmciadevs = get_pcmcia_devices($type, $pcic);
log::l("pcmcia probe found " . scalar @pcmciadevs . " $type devices");
my @devs = (@pcidevs, @pcmciadevs);
@@ -290,10 +290,28 @@ sub load_thiskind($;&) {
@devs;
}
-sub get_pcmcia_devices($) {
- my ($type) = @_;
+sub pcmcia_need_config($) {
+ return $_[0] && ! -s "/var/run/stab";
+}
+
+sub get_pcmcia_devices($$) {
+ my ($type, $pcic) = @_;
my (@devs, $module, $desc);
+ #- try to setup pcmcia if cardmgr is not running.
+ if (pcmcia_need_config($pcic)) {
+ log::l("i try to configure pcmcia services");
+
+ symlink("/tmp/rhimage/etc/pcmcia", "/etc/pcmcia") unless -e "/etc/pcmcia";
+
+ load("pcmcia_core");
+ load($pcic);
+ load("ds");
+
+ #- run cardmgr in foreground while it is configuring the card.
+ run_program::run("cardmgr", "-f", "-m" ,"/modules");
+ }
+
foreach (cat_("/var/run/stab")) {
$desc = $1 if /^Socket\s+\d+:\s+(.*)/;
$module = $1 if /^\d+\s+$type[^\s]*\s+([^\s]+)/;