Subversion Repositories public

Compare Revisions

Ignore whitespace Rev 74 → Rev 75

/incron/trunk/incron.conf.5
0,0 → 1,44
.TH "incron.conf" "5" "0.5.3" "Lukas Jelinek" "incron documentation"
.SH "NAME"
/etc/incron.conf \- main config file for inotify cron (incron)
.SH "DESCRIPTION"
The file \fI/etc/incron.conf\fR contains default settings for the program
.BR incrond.
Each line holds a single value pair in the form \fIoption\fR = \fIvalue\fR.
Comment lines must have a hash sign (#) in the first line.
.P
The valid configuration options are:
.TP
\fBsystem_table_dir\fP
This directory is examined by incrond for system table files.
.BR Default : \fI/etc/incron.d\fR
.TP
\fBuser_table_dir\fP
This directory is examined by incrond for user table files.
.BR Default : \fI/var/spool/incron\fR
.TP
\fBallowed_users\fP
This file contains users allowed to use incron.
.BR Default : \fI/etc/incron.allow\fR
.TP
\fBdenied_users\fP
This file contains users denied to use incron.
.BR Default : \fI/etc/incron.deny\fR
.TP
\fBlockfile_dir\fP
This directory is used for creating a lock avoiding to run multiple instances
of incrond.
.BR Default : \fI/var/run\fR
.TP
\fBlockfile_name\fP
This name (appended by '.pid') is used for creating a lock avoiding to run multiple instances of incrond.
.BR Default : \fIincrond\fR
.TP
\fBeditor\fP
This name or path is used to run as an editor for editting incron tables. Default \fIno editor\fR is given, system editor used, this option overide this.
.SH "SEE ALSO"
incrond(8), incrontab(1), incrontab(5)
.SH "AUTHOR"
Lukas Jelinek <lukas@aiken.cz>
.SH "COPYING"
This program is free software. It can be used, redistributed and/or modified under the terms of the GNU General Public License, version 2.
/incron/trunk/ict-main.cpp
279,7 → 279,7
goto end;
}
execlp(e, e, s, NULL);
execlp(e, e, s, (const char*) NULL);
_exit(1);
}
else if (pid > 0) {
/incron/trunk/incrontab.5
1,4 → 1,4
.TH "incrontab" "5" "0.5.2" "Lukas Jelinek" "incron documentation"
.TH "incrontab" "5" "0.5.3" "Lukas Jelinek" "incron documentation"
.SH "NAME"
incrontab \- tables for driving inotify cron (incron)
.SH "DESCRIPTION"
37,7 → 37,7
And the final line shows how to use numeric event mask instead of textual one. The value 12 is exactly the same as IN_ATTRIB,IN_CLOSE_WRITE.
 
.SH "SEE ALSO"
incrond(8), incrontab(1)
incrond(8), incrontab(1), incron.conf(5)
.SH "AUTHOR"
Lukas Jelinek <lukas@aiken.cz>
.SH "COPYING"
/incron/trunk/CHANGELOG
1,3 → 1,11
0.5.3 2007-02-08
* bug related to ignoring new tables fixed (#0000142)
* explicit typecasting in execlp() call (#0000145)
* memory leak related to loaded tables fixed (#0000144)
* documentation for 'incrontab -d' added (#0000146)
* man page for incron.conf added (#0000147)
 
 
0.5.2 2007-02-04
* lockfile permissions changed to 0644 (reopened #0000137)
* incorrect reporting of removing non-existing tables fixed (#0000141)
/incron/trunk/icd-main.cpp
108,7 → 108,7
 
 
 
/// Attempts to load all user incron tables.
/// Attempts to load all (user and system) incron tables.
/**
* Loaded tables are registered for processing events.
*
191,6 → 191,24
closedir(d);
}
 
/// Deallocates all memory used by incron tables and unregisters them from the dispatcher.
/**
* \param[in] pEd event dispatcher
*/
void free_tables(EventDispatcher* pEd)
{
pEd->Clear();
SUT_MAP::iterator it = g_ut.begin();
while (it != g_ut.end()) {
UserTable* pUt = (*it).second;
delete pUt;
it++;
}
g_ut.clear();
}
 
/// Prepares a 'dead/done child' notification pipe.
/**
* This function returns no value at all and on error it
235,11 → 253,13
* \param[in] longCmd long form of command
* \return true = string accepted, false = otherwise
*/
/*
bool check_parameter(const char* s, const char* shortCmd, const char* longCmd)
{
return strcmp(s, shortCmd) == 0
|| strcmp(s, longCmd) == 0;
}
*/
 
/// Initializes a poll array.
/**
314,7 → 334,7
if (AppArgs::ExistsOption("kill")) {
fprintf(stderr, "attempting to terminate a running instance of incrond...\n");
if (app.Terminate()) {
fprintf(stderr, "instance(s) notified, going down\n");
fprintf(stderr, "the instance notified, going down\n");
return 0;
}
else {
386,7 → 406,7
in.SetNonBlock(true);
in.SetCloseOnExec(true);
uint32_t wm = IN_CLOSE_WRITE | IN_DELETE | IN_MOVE | IN_DELETE_SELF | IN_UNMOUNT;
uint32_t wm = IN_CREATE | IN_CLOSE_WRITE | IN_DELETE | IN_MOVE | IN_DELETE_SELF | IN_UNMOUNT;
InotifyWatch stw(sysBase, wm);
in.Add(stw);
InotifyWatch utw(userBase, wm);
403,6 → 423,8
goto error;
}
ed.Rebuild(); // not too efficient, but simple
signal(SIGTERM, on_signal);
signal(SIGINT, on_signal);
signal(SIGCHLD, on_signal);
424,6 → 446,8
}
free_tables(&ed);
if (g_cldPipe[0] != -1)
close(g_cldPipe[0]);
if (g_cldPipe[1] != -1)
/incron/trunk/incrond.8
1,4 → 1,4
.TH "incrond" "8" "0.5.2" "Lukas Jelinek" "incron documentation"
.TH "incrond" "8" "0.5.3" "Lukas Jelinek" "incron documentation"
.SH "NAME"
incrond \- inotify cron (incron) daemon
 
26,7 → 26,7
 
\fB\-f <FILE>\fR (or \fB\-\-config=<FILE>\fR) option specifies another location for the configuration file (/etc/incron.conf is used by default).
.SH "SEE ALSO"
incrontab(1), incrontab(5)
incrontab(1), incrontab(5), incron.conf(5)
.SH "BUGS"
incrond is currently not resistent against looping. Recursive monitoring (whole subtrees) has not been implemented yet.
.SH "AUTHOR"
/incron/trunk/usertable.h
103,7 → 103,18
return m_pPoll;
}
/// Rebuilds the poll array data.
void Rebuild();
/// Removes all registered user tables.
/**
* It doesn't cause poll data rebuilding.
*/
inline void Clear()
{
m_maps.clear();
}
private:
int m_iPipeFd; ///< pipe file descriptor
int m_iMgmtFd; ///< table management file descriptor
114,9 → 125,6
size_t m_size; ///< poll data size
struct pollfd* m_pPoll; ///< poll data array
/// Rebuilds the poll array data.
void Rebuild();
/// Processes events on the table management inotify object.
void ProcessMgmtEvents();
};
/incron/trunk/Makefile
51,7 → 51,7
$(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR)
$(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR)
 
install-man: incrontab.1 incrontab.5 incrond.8
install-man: incrontab.1 incrontab.5 incrond.8 incron.conf.5
$(INSTALL) -m 0755 -d $(MANPATH)/man1
$(INSTALL) -m 0755 -d $(MANPATH)/man5
$(INSTALL) -m 0755 -d $(MANPATH)/man8
58,6 → 58,7
$(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1
$(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5
$(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8
$(INSTALL) -m 0644 incron.conf.5 $(MANPATH)/man5
 
uninstall: uninstall-man
[ -d $(PREFIX) ]
68,7 → 69,8
uninstall-man:
rm -f $(MANPATH)/man1/incrontab.1
rm -f $(MANPATH)/man5/incrontab.5
rm -f $(MANPATH)/man8/incrontab.8
rm -f $(MANPATH)/man8/incrond.8
rm -f $(MANPATH)/man5/incron.conf.5
 
update: uninstall install
 
80,7 → 82,7
cp *.cpp $(RELEASEDIR)
cp incron.conf.example $(RELEASEDIR)
cp Makefile CHANGELOG COPYING LICENSE-GPL LICENSE-LGPL LICENSE-X11 README TODO VERSION $(RELEASEDIR)
cp incrond.8 incrontab.1 incrontab.5 $(RELEASEDIR)
cp incrond.8 incrontab.1 incrontab.5 incron.conf.5 $(RELEASEDIR)
tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
bzip2 -9 $(RELEASE).tar
tar -c -f $(RELEASE).tar -C $(RELEASEDIR)/.. $(RELEASE)
/incron/trunk/incron.h
27,7 → 27,7
#define INCRONTAB_NAME "incrontab"
 
/// Application version (release)
#define INCRON_VERSION "0.5.2"
#define INCRON_VERSION "0.5.3"
 
/// Address for sending bugs
#define INCRON_BUG_ADDRESS "<bugs@aiken.cz>"
/incron/trunk/incrontab.1
1,4 → 1,4
.TH "incrontab" "1" "0.5.2" "Lukas Jelinek" "incron documentation"
.TH "incrontab" "1" "0.5.3" "Lukas Jelinek" "incron documentation"
.SH "NAME"
incrontab \- table manipulator for inotify cron (incron)
.SH "SYNOPSIS"
12,7 → 12,7
 
All informational messages of this program are printed to the standard error output (stderr).
 
If \fI/etc/incron.allow\fR exists only users listed here may use incron. Otherwise if \fI/etc/incron.deny\fR exists only users NOT listed here may use incron. If none of these files exists everyone is allowed to use incron. (\fBImportant note:\fR This behavior is insecure and will be probably changed to be compatible with the style used by ISC Cron.) Location of this files can be changed in the configuration.
If \fI/etc/incron.allow\fR exists only users listed here may use incron. Otherwise if \fI/etc/incron.deny\fR exists only users NOT listed here may use incron. If none of these files exists everyone is allowed to use incron. (\fBImportant note:\fR This behavior is insecure and will be probably changed to be compatible with the style used by ISC Cron.) Location of these files can be changed in the configuration.
 
The first form of this command imports a file, validates it and stores to the table. "\-" can be used for loading from the standard input.
 
28,6 → 28,8
 
\fB\-t\fR (or \fB\-\-types\fR) option causes the list of supported event types (delimited by commas) is printed to the standard output. This feature is intended for front\-end applications to find out which event types was compiled in.
 
\fB\-d\fR (or \fB\-\-reload\fR) option causes reloading the current table by \fIincrond\fR(8). It is done through "touching" the table (writing into it without modifying it). This feature is intended e.g. for creating watches on newly created files (with already existing rules) or for rearming IN_ONESHOT watches.
 
\fB\-f <FILE>\fR (or \fB\-\-config=<FILE>\fR) option specifies another location for the configuration file (/etc/incron.conf is used by default). This feature requires root privileges.
 
There is a few complex algorithm how to determine which editor will be user for editting. If any of the following rule succeeds the appropriate editor is used:
44,7 → 46,7
 
It's not recommended to use graphical editors (such as gVim, KEdit etc.) due to possible problems with connecting to the X server.
.SH "SEE ALSO"
incrond(8), incrontab(5)
incrond(8), incrontab(5), incron.conf(5)
.SH "AUTHOR"
Lukas Jelinek <lukas@aiken.cz>
.SH "COPYING"