summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-07 02:12:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-07 02:12:31 +0000
commit13de91fbb60952073cf1d070fb1692d968d8d9b1 (patch)
tree2b191e05c09e92d381c6750c045ce664906636bd /perl-install/install_any.pm
parentdbba4bdb651ed70c3b76b570f49516a9426dd0cf (diff)
downloaddrakx-13de91fbb60952073cf1d070fb1692d968d8d9b1.tar
drakx-13de91fbb60952073cf1d070fb1692d968d8d9b1.tar.gz
drakx-13de91fbb60952073cf1d070fb1692d968d8d9b1.tar.bz2
drakx-13de91fbb60952073cf1d070fb1692d968d8d9b1.tar.xz
drakx-13de91fbb60952073cf1d070fb1692d968d8d9b1.zip
- move configure_pcmcia() and write_pcmcia() out of modules.pm to install_any.pm
- load pcmcia_core, $pcic and ds in one call to modules::load - don't pass prefix to write_pcmcia()
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm39
1 files changed, 39 insertions, 0 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;