Subversion Repositories public

Rev

Rev 57 | Rev 67 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
45 luk 1
 
2
3
 
63 luk 4
45 luk 5
 
6
2. Requirements
7
3. How to use
8
4. Bugs, suggestions
9
5. Licensing
10
6. Documentation
11
12
 
13
 
14
15
 
16
 
17
This program is the "inotify cron" system. It consist of a daemon and
18
a table manipulator. You can use it a similar way as the regular cron.
19
The difference is that the inotify cron handles filesystem events
20
rather than time periods.
21
22
 
23
* Linux kernel 2.6.13 or later (with inotify compiled in)
24
* inotify headers (inotify.h, sometimes inotify-syscalls.h) installed in
55 luk 25
  <INCLUDE_DIR>/sys. The most common place is /usr/include/sys.
45 luk 26
* GCC 4.x compiler (probably works also with GCC 3.4, possibly with
27
  older versions too)
28
29
 
30
 
31
Because this version is very early it does not contain a standard
32
portable build mechanism. There is only a Makefile which must be
33
modified manually. On many Linux systems you need not to change
34
anything.
35
36
 
37
check the PREFIX and other common variables. If done you can
38
now build the files ('make').
39
40
 
57 luk 41
45 luk 42
 
43
 
44
The incron daemon (incrond) must be run under root (typically from
45
runlevel script etc.). It loads the current user tables and hooks
46
them for later changes.
47
48
 
49
since it SUIDs. For manipulation with the tables use basically
50
the same syntax as for the crontab program. You can import a table,
51
remove and edit the current table.
52
53
 
54
 <path> <mask> <command>
55
56
 
57
58
 
59
  <mask> is a symbolic (see inotify.h; use commas for separating
60
         symbols) or numeric mask for events
61
  <command> is an application or script to run on the events
62
63
 
64
65
 
66
  $@ - the watched filesystem path (see above)
67
  $# - the event-related file name
68
  $% - the event flags (textually)
55 luk 69
  $& - the event flags (numerically)
70
45 luk 71
 
47 luk 72
disables events occurred during the event handling (to avoid loops).
73
74
 
55 luk 75
an argument every time a file is changed in /var/mail. One of
45 luk 76
the solutions follows:
77
78
 
79
80
 
55 luk 81
the first argument and the numeric event flags as the second one.
82
It have to monitor all events on files in /tmp. Here is it:
83
45 luk 84
 
55 luk 85
86
 
87
 
45 luk 88
THIS PROGRAM IS AN ALPHA VERSION. IT PROBABLY CONTAINS BUGS AND
89
THEREFORE IT IS NOT INTENDED FOR PRODUCTION USE.
90
91
 
92
please use the bug tracking system at http://bts.aiken.cz.
93
94
 
95
 
96
This program is free software; you can redistribute it and/or
97
modify it under the terms of the GNU General Public License,
98
version 2  (see LICENSE-GPL).
99
100
 
57 luk 101
Please look into the source files for detailed information.
45 luk 102