summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-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
#