From e651723c5a0a810727e83fa78f2596a44af4b1a9 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Sat, 8 May 2004 22:56:11 +0000 Subject: Fixed firmware installation. --- perl-install/standalone/scannerdrake | 13 +++++++++---- 1 file 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); -- cgit v1.2.1