Well, you must be half genious half ferry.
The problem maker is not incron but linux (multitasking ? the same
problem I saw in wintendo batch files). I use two statements mv file
then unzip the same file. mv is fast but not fast enough. Probably unzip
is trying to work on still not existing file name (i node?), so I put a
sleep between those lines in call2.sh - et voila IT WORKS.
Thanks a lot.
Regards
Franjo
________________________________
From: Kumer, Franjo
Sent: Wednesday, January 21, 2009 10:01 AM
To: incron_at_aiken.cz
Subject: RE: Problem with incron and unzip
Thanks for the answer.
In composing my mail I appended wrong zip file. Perhaps this one is
better.
My project is not realy autopatching, more a nick name. An operater has
to check zip file on portal and transfer it to linux box. This procedure
will allways do one person at a time an only by request of application
vendor. I is strictly intranet business aming to test site NOT
production.
I send you my writings because I can run call1.sh skript manually or by
cron and it works fine. If called by incron it does not work.
I made simpler test :
1. install incron
2. start incrond
3.create directory Download in working directory (in my case
/INIS_Popravki/TEST)
4.edit incrontab (I used file incron.in2test)
5. write script call2.sh
6. create temp.zip file (no matter what is in that archive)
7. copy temp.zip do Download
8. incrond fires and moves temp.zip archive to working directory when
tries to unzip file unzip.log is written
9. unzip.log shows the error - End-of-central-directory....
manual control
10 kill incrond process
11 copy test.zip into Download
12 run ./call2.sh in terminal
13 temp.zip archive is moved to working directory
14 temp.zip archive is expanded - no unzip.log
regards
Franjo Kumer
-----Original Message-----
From: Samat K Jain [mailto:lists_at_samat.org]
Sent: Tuesday, January 20, 2009 5:40 PM
To: incron_at_aiken.cz
Cc: Kumer, Franjo
Subject: Re: Problem with incron and unzip
On Tuesday 20 January 2009 4:42:48 am Kumer, Franjo wrote:
> I am working on a project AutoPatching.
For other people reading this thread, I feel as if I have to mention,
autopatching like this is a BAD idea... but I am sure you understand the
risks.
> I appended all files that are involved. The most interesting is
AutoErr.log.
The contents of AutoErr.log seem pretty self-explanatory... the zip file
is bad? I confirmed this when I downloaded the file you provided,
renamed it from .txt to .zip, and ran unzip against it:
$ unzip -t ins-0534-2008_test.zip
Archive: ins-0534-2008_test.zip
error [ins-0534-2008_test.zip]: missing 1 bytes in zipfile
(attempting to process anyway)
error [ins-0534-2008_test.zip]: attempt to seek before beginning of
zipfile
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
(attempting to re-compensate)
testing: pozeni.sql OK
testing: xxxxxxxr.rep OK
testing: xxxxxxxr.fmb OK
testing: RZP_IZRACUN_PZZ.pks OK
testing: RZP_IZRACUN_PZZ.pkb OK
testing: naslov.txt bad CRC 691786f0 (should be
ade8a8dd)
file #7: bad zipfile offset (local header sig): 110845
(attempting to re-compensate)
testing: MG_NS-0544-2008.lst OK
testing: authentication.lst OK
testing: 1recompl.logr OK
testing: 2recompl.logr OK
testing: 3recompl.logr OK
testing: 4recompl.logr OK
At least one error was detected in ins-0534-2008_test.zip.
-- Samat Jain <http://samat.org/> | GPG: 0x1A1993D3 Partner, Chief Technology Officer | Rhombic Networks, LLC If you can't convince them, confuse them. -- Harry S Truman (14)Received on Thu Jan 22 2009 - 07:25:27 CET
This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST