summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/scannerdrake13
1 files changed, 9 insertions, 4 deletions
diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake
index 03818e79d..0bb42a5b4 100755
--- a/perl-install/standalone/scannerdrake
+++ b/perl-install/standalone/scannerdrake
@@ -264,13 +264,18 @@ sub updatefirmware {
return 0 if !$firmware;
- # Install the firmware file in /usr/share/sane/firmware
- $firmware = scanner::installfirmware($firmware, $_->{val}{BACKEND});
-
- # Enter the path to the firmware in the appropriate config file
foreach (@configured) {
next if $_->{val}{DESCRIPTION} ne $scannerchoice;
+ # Install the firmware file in /usr/share/sane/firmware
my $backend = $_->{val}{BACKEND};
+ $firmware = scanner::installfirmware($firmware, $backend);
+ if (!$firmware) {
+ $in->ask_warn('Error',
+ N("Could not install the firmware file for the %s!",
+ $scannerchoice));
+ return 0;
+ }
+ # Enter the path to the firmware in the appropriate config file
my $firmwareline =$_->{val}{FIRMWARELINE};
$firmwareline =~ s/\$FIRMWARE/$firmware/sg;
scanner::setfirmware($backend, $firmwareline);