summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install_any.pm39
-rw-r--r--perl-install/install_steps.pm4
-rw-r--r--perl-install/install_steps_interactive.pm2
-rw-r--r--perl-install/modules.pm41
4 files changed, 42 insertions, 44 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index cab59593a..3b1600dd9 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1244,4 +1244,43 @@ sub remove_bigseldom_used() {
qw(mkreiserfs resize_reiserfs mkfs.xfs fsck.jfs);
}
+
+#-###############################################################################
+#- pcmcia various
+#-###############################################################################
+sub configure_pcmcia {
+ my ($pcic) = @_;
+
+ #- try to setup pcmcia if cardmgr is not running.
+ my $running if 0;
+ return if $running;
+ $running = 1;
+
+ log::l("i try to configure pcmcia services");
+
+ symlink "/tmp/stage2/$_", $_ foreach "/etc/pcmcia";
+
+ eval { modules::load('pcmcia_core', $pcic, '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.
+ modules::read_already_loaded();
+}
+
+sub write_pcmcia {
+ my ($pcic) = @_;
+
+ #- should be set after installing the package above otherwise the file will be renamed.
+ setVarsInSh("$::prefix/etc/sysconfig/pcmcia", {
+ PCMCIA => bool2yesno($pcic),
+ PCIC => $pcic,
+ PCIC_OPTS => "",
+ CORE_OPTS => "",
+ });
+}
+
+
1;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index ec83e3fd9..1660b2a89 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -153,7 +153,7 @@ sub acceptLicense {}
#------------------------------------------------------------------------------
sub setupSCSI {
my ($o) = @_;
- modules::configure_pcmcia($o->{pcmcia}) if $o->{pcmcia};
+ install_any::configure_pcmcia($o->{pcmcia}) if $o->{pcmcia};
modules::load(modules::category2modules('disk/cdrom'));
modules::load_category('bus/firewire');
modules::load_category('disk/scsi|hardware_raid|firewire');
@@ -433,7 +433,7 @@ Consoles 1,3,4,7 may also contain interesting information";
run_program::rooted($o->{prefix}, 'lvm2', 'vgscan') if -e '/etc/lvmtab';
#- configure PCMCIA services if needed.
- modules::write_pcmcia($o->{prefix}, $o->{pcmcia});
+ install_any::write_pcmcia($o->{pcmcia});
#- for mandrake_firstime
touch "$o->{prefix}/var/lock/TMP_1ST";
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 92f4fa805..9be687103 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -223,7 +223,7 @@ sub setupSCSI {
if (!$::noauto && arch() =~ /i.86/) {
if ($o->{pcmcia} ||= !$::testing && c::pcmcia_probe()) {
my $w = $o->wait_message(N("PCMCIA"), N("Configuring PCMCIA cards..."));
- my $results = modules::configure_pcmcia($o->{pcmcia});
+ my $results = install_any::configure_pcmcia($o->{pcmcia});
undef $w;
$results and $o->ask_warn('', $results);
}
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 7bc173d4f..a3d7b9b30 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -354,47 +354,6 @@ sub read_stage1_conf {
mergein_conf($_[0]);
}
-#-###############################################################################
-#- pcmcia various
-#-###############################################################################
-sub configure_pcmcia {
- my ($pcic) = @_;
-
- #- try to setup pcmcia if cardmgr is not running.
- my $running if 0;
- return if $running;
- $running = 1;
-
- log::l("i try to configure pcmcia services");
-
- symlink "/tmp/stage2/$_", $_ foreach "/etc/pcmcia";
-
- 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();
-}
-
-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 => "",
- });
-}
-
#-###############################################################################
#- internal functions