ar- / incron

cron-like daemon which handles filesystem events
Other
229 stars 51 forks source link

incron logs command to execute but command is not executing #2

Closed ar- closed 9 years ago

ar- commented 9 years ago

Originals: http://bts.aiken.cz/view.php?id=159 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584134

Attaching usage log, for reference.

empting "log"

andres@terminus:~$ > /tmp/ic.log

verifying incrontab

andres@terminus:~$ incrontab -l /home/andres/maps IN_MODIFY /usr/bin/make -C $@ > /tmp/ic.log 2>&1

modifying file

andres@terminus:~$ cat > maps/all.dot <<EOF

digraph { nod }

validating date

andres@terminus:~$ date Tue Jun 1 10:01:39 COT 2010

verifying syslog, the commands is "executed"

andres@terminus:~$ su -c "tail -5 /var/log/syslog" Password: Jun 1 10:01:33 terminus incrond[5924]: (andres) CMD (/usr/bin/make -C /home/and res/maps > /tmp/ic.log 2>&1) Jun 1 10:01:33 terminus incrond[5924]: (andres) CMD (/usr/bin/make -C /home/and res/maps > /tmp/ic.log 2>&1)

verifying Makefile

andres@terminus:~$ cat maps/Makefile all: all.png

all.png: all.dot dot -Tpng $< > $@

log is empty

andres@terminus:~$ cat /tmp/ic.log

outfile is outdated

andres@terminus:~$ ls -l maps/all.png -rw-r--r-- 1 andres andres 12457 2010-06-01 09:58 maps/all.png

the command works

andres@terminus:~$ /usr/bin/make -C /home/andres/maps > /tmp/ic.log 2>&1

outfile is updated

andres@terminus:~$ ls -l maps/all.png -rw-r--r-- 1 andres andres 133 2010-06-01 10:04 maps/all.png

"log" is logging

andres@terminus:~$ cat /tmp/ic.log make: Entering directory /home/andres/maps' dot -Tpng all.dot > all.png make: Leaving directory/home/andres/maps'

andres@terminus:~$ date Tue Jun 1 10:05:11 COT 2010

weird

ar- commented 9 years ago

Fixed with commit 816850fcd664fed22c64d6dc6bad9843b8ebc161