commited wrong file :-/

This commit is contained in:
Axel Kittenberger 2010-05-20 12:42:58 +00:00
parent 7ce11b7719
commit 4f4c667d6e
1 changed files with 8 additions and 18 deletions

View File

@ -730,16 +730,13 @@ bool action(struct dir_conf * dir_conf,
argv[argc++] = parse_option_text(optp->text, recursive);
continue;
case CO_EXCLUDE :
printf("!!!!\n");
// --exclude-from and the exclude file
// insert only when the exclude file is present otherwise skip it.
if (dir_conf->exclude_file == NULL && default_exclude_file == NULL) { //AXK
printf("??\n");
if (dir_conf->exclude_file == NULL && default_exclude_file == NULL) {
continue;
}
printf("?!!\n");
argv[argc++] = s_strdup("--exclude-from");
argv[argc++] = s_strdup(dir_conf->exclude_file ? dir_conf->exclude_file : default_exclude_file); //AXK
argv[argc++] = s_strdup(dir_conf->exclude_file ? dir_conf->exclude_file : default_exclude_file);
continue;
case CO_SOURCE :
argv[argc++] = s_strdup(src);
@ -760,9 +757,9 @@ bool action(struct dir_conf * dir_conf,
argv[argc++] = NULL;
/* debug dump of command-line options */
for (i=0; i<argc; ++i) {
printlogf(DEBUG, "exec parameter %i:%s", i, argv[i]);
}
//for (i=0; i<argc; ++i) {
// printlogf(DEBUG, "exec parameter %i:%s", i, argv[i]);
//}
if (flag_dryrun) {
return true;
@ -1004,7 +1001,6 @@ int add_dirwatch(char const * dirname, int parent, struct dir_conf * dir_conf)
}
for (i = 0; i < exclude_dir_n; i++) {
printf("comparing %s with %s\n", dirname, exclude_dirs[i]);
if (!strcmp(dirname, exclude_dirs[i])) {
return -1;
}
@ -1439,7 +1435,7 @@ bool parse_directory(xmlNodePtr node) {
printlogf(ERROR, "error in config file: attribute filename missing from <binary>\n");
terminate(LSYNCD_BADCONFIGFILE);
}
dc->binary = s_strdup((char *) xc); //AXK
dc->binary = s_strdup((char *) xc);
} else if (!xmlStrcmp(dnode->name, BAD_CAST "callopts")) {
if (dc->callopts) {
printlogf(ERROR, "error in config file: there is more than one <callopts> in a <directory>\n");
@ -1447,6 +1443,7 @@ bool parse_directory(xmlNodePtr node) {
}
dc->callopts = parse_callopts(dnode);
} else {
// TODO missing sourcespecific exclude files?
printlogf(ERROR, "error in config file: unknown node in <directory> \"%s\"\n", dnode->name);
terminate(LSYNCD_BADCONFIGFILE);
}
@ -1764,7 +1761,7 @@ bool parse_exclude_file(char *filename) {
terminate(LSYNCD_FILENOTFOUND);
}
printf("eread %s\n", line);
sl = strlen(line);
if (sl == 0) {
@ -1827,19 +1824,13 @@ void write_pidfile() {
int main(int argc, char **argv)
{
int i;
printf("1\n");
openlog("lsyncd", LOG_CONS | LOG_PID, LOG_DAEMON);
printf("2\n");
parse_options(argc, argv);
printf("3\n");
if (default_exclude_file) {
parse_exclude_file(default_exclude_file);
}
printf("4\n");
inotf = inotify_init();
if (inotf == -1) {
@ -1847,7 +1838,6 @@ int main(int argc, char **argv)
errno, strerror(errno));
return LSYNCD_NOINOTIFY;
}
printf("4\n");
if (!flag_nodaemon) {
// this will make this process child of init