summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-04-19 13:36:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-04-19 13:36:08 +0000
commitc2b44f66b9d3bccd78764b208feaa9d9a119a0a1 (patch)
treed9a3be817d231502da399f056374e25491551ae0 /perl-install/printerdrake.pm
parent6a05c7c12fcc70058febc82d139dbe4155ac951b (diff)
downloaddrakx-backup-do-not-use-c2b44f66b9d3bccd78764b208feaa9d9a119a0a1.tar
drakx-backup-do-not-use-c2b44f66b9d3bccd78764b208feaa9d9a119a0a1.tar.gz
drakx-backup-do-not-use-c2b44f66b9d3bccd78764b208feaa9d9a119a0a1.tar.bz2
drakx-backup-do-not-use-c2b44f66b9d3bccd78764b208feaa9d9a119a0a1.tar.xz
drakx-backup-do-not-use-c2b44f66b9d3bccd78764b208feaa9d9a119a0a1.zip
no_comment
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 40e6948b6..0d322e4ef 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -13,18 +13,23 @@ use printer;
1;
-sub setup_local($$$) {
- my ($printer, $in, $install) = @_;
-
+sub auto_detect {
+ my ($in) = @_;
{
my $w = $in->wait_message(_("Test ports"), _("Detecting devices..."));
eval { modules::load("parport_pc"); modules::load("parport_probe"); modules::load("lp"); };
}
+ my $b = before_leaving { eval { modules::unload("parport_probe") } };
+ detect_devices::whatPrinter();
+}
+
+
+sub setup_local($$$) {
+ my ($printer, $in, $install) = @_;
my @port = ();
my @str = ();
- my @parport = detect_devices::whatPrinter();
- eval { modules::unload("parport_probe") };
+ my @parport = auto_detect();
foreach (@parport) {
push @str, _("A printer, model \"%s\", has been detected on ", $_->{val}{DESCRIPTION}) . $_->{port};
}