Skip to content

Finit ignores deleted/moved .conf files in /etc/finit.d #340

@troglobit

Description

@troglobit

@JackNewman12 reports, in #337:

I also noticed that conf.c do_change() seems to ignore deleted files.
Commenting out this checks causes a deleted or moved .conf to correctly
remove a service. Not sure why this check is here so I'm afraid I might
be missing some edge-cases.

 static int do_change(char *dir, char *name, uint32_t mask) 
 { 
 	char fn[strlen(dir) + strlen(name) + 2]; 
 	struct conf_change *node; 
  
 	paste(fn, sizeof(fn), dir, name); 
 	dbg("path: %s mask: %08x", fn, mask); 
  
 	node = conf_find(fn); 
- 	if (mask & (IN_DELETE | IN_MOVED_FROM)) { 
- 		drop_change(node); 
- 		return 0; 
- 	}
	if (node) {
		dbg("Event already registered for %s ...", name);
		return 0;
	}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions