fprot.sh bug: $URL_UPDATE_SITE has multiple lines
Posted: Fri Aug 10, 2012 11:01 pm
I found recently that the fprot-update-link.xml file from f-prot website is formatted in one line. And this makes the script ubcd/tools/linux/antivirus/fprot.sh not working.
How to test:
1. Run the ubcd/tools/linux/antivirus/fprot.sh script. (in UBCD 5.1.1)
Actual result:
The script will fail to download the antivir.def file, and you'll see the error message like below.
(Note the line:
wget: unable to resolve host address `srv3.directupdates.f-prot.net\nsrv6.directupdates.f-prot.net\nsrv7.directupdates.f-prot.net\nsrv8.directupdates.f-prot.net\nsrv9.directupdates.f-prot.net')
Expected result:
The script should successfully locate the antivir.def file and download it.
I made a patch for this script. I added a command after grep so that the variable $URL_UPDATE_SITE will always contain one line.
http://dl.dropbox.com/u/70170658/fprot-patched.sh
EDIT: Now I use instead, because UBCD does not have the win32 binaries for "head" command.
How to test:
1. Run the ubcd/tools/linux/antivirus/fprot.sh script. (in UBCD 5.1.1)
Actual result:
The script will fail to download the antivir.def file, and you'll see the error message like below.
Code: Select all
Start downloading the F-Prot definition file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--2012-08-11 13:54:35-- http://srv3.directupdates.f-prot.net%0Asrv6.directupdates.f-prot.net%0Asrv7.directupdates.f-prot.net%0Asrv8.directupdates.f-prot.net%0Asrv9.directupdates.f-prot.net/files/defs/v.6/2012-08-10T14-45-01-673e9e0b9fd99bbff4dfc64b87c5c8f4/antivir.def
Resolving srv3.directupdates.f-prot.net\nsrv6.directupdates.f-prot.net\nsrv7.directupdates.f-prot.net\nsrv8.directupdates.f-prot.net\nsrv9.directupdates.f-prot.net (srv3.directupdates.f-prot.net\nsrv6.directupdates.f-prot.net\nsrv7.directupdates.f-prot.net\nsrv8.directupdates.f-prot.net\nsrv9.directupdates.f-prot.net)... failed: Name or service not known.
wget: unable to resolve host address `srv3.directupdates.f-prot.net\nsrv6.directupdates.f-prot.net\nsrv7.directupdates.f-prot.net\nsrv8.directupdates.f-prot.net\nsrv9.directupdates.f-prot.net'
Download finished.
Make 'fprot-definitions.txz' file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tar: /tmp/ubcd-temp/f-prot/definitions: Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now
wget: unable to resolve host address `srv3.directupdates.f-prot.net\nsrv6.directupdates.f-prot.net\nsrv7.directupdates.f-prot.net\nsrv8.directupdates.f-prot.net\nsrv9.directupdates.f-prot.net')
Expected result:
The script should successfully locate the antivir.def file and download it.
I made a patch for this script. I added a
Code: Select all
head -n 1
http://dl.dropbox.com/u/70170658/fprot-patched.sh
EDIT: Now I use
Code: Select all
| sed -n '1 p'