summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2001-11-19 10:50:37 +0000
committerYves Duret <yduret@mandriva.com>2001-11-19 10:50:37 +0000
commit0376f8a9a64aa75e405af4f42fa0c30ef72f86d7 (patch)
tree064cae572307474381f971a176e0eb2dea81d92c /perl-install/standalone
parent7d5053d26dd22f2bf92f93c266757d083531019c (diff)
downloaddrakx-0376f8a9a64aa75e405af4f42fa0c30ef72f86d7.tar
drakx-0376f8a9a64aa75e405af4f42fa0c30ef72f86d7.tar.gz
drakx-0376f8a9a64aa75e405af4f42fa0c30ef72f86d7.tar.bz2
drakx-0376f8a9a64aa75e405af4f42fa0c30ef72f86d7.tar.xz
drakx-0376f8a9a64aa75e405af4f42fa0c30ef72f86d7.zip
added dynamic support
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/scannerdrake17
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake
index 3f85fc6c9..df508677e 100755
--- a/perl-install/standalone/scannerdrake
+++ b/perl-install/standalone/scannerdrake
@@ -27,11 +27,11 @@ use scanner;
$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
for (@ARGV) {
/^--version$/ and die 'version: $Id$ '."\n";
- /^--help$/ and die 'logdrake [--version] [--help] [--manual] [--device=dev] [--update-sane=sane_desc_dir] [--update-usbtable]';
+ /^--help$/ and die 'logdrake [--version] [--help] [--manual] [--device=dev] [--update-sane=sane_desc_dir] [--update-usbtable] [--dynamic=dev]';
/^--update-usbtable$/ and do {scanner::updateScannerDBfromUsbtable(); exit;};
/^--update-sane=(.*)$/ and do {scanner::updateScannerDBfromSane($1); exit;};
/^--manual$/ and $::Manual=1;
- /^--device=(.*)$/ and do { $::isFile = ($::File) = $1; next };
+ /^--dynamic=(.*)$/ and do { dynamic($1); exit;};
}
$in = 'interactive'->vnew('su', 'default');
@@ -62,8 +62,14 @@ sub manual {
}
sub dynamic {
- # return the backend for the device
- # or do whatis needed !!
+ @f = scanner::findScannerUsbport();
+ foreach (@f) {
+ if (member($_->{val}{DESCRIPTION}), keys %$scanner::scannerDB) {
+ my $name = $_->{val}{DESCRIPTION};
+ $name =~ s/\s$//; #some HP entry have a trailing space, i will correct usbtable asap
+ scanner::confScanner($name, $_->{port}) unless($scanner::scannerDB->{$model}{flags}{unsupported});
+ }
+ }
}
sub tryConfScanner {
@@ -86,6 +92,9 @@ sub quit {
#-----------------------------------------------
# $Log$
+# Revision 1.3 2001/11/19 10:50:37 yduret
+# added dynamic support
+#
# Revision 1.2 2001/11/12 15:19:54 yduret
# update
#