Re:Etckeeper lets you store changes in /etc to git
by ibotty on Monday April 29, 2013 @03:21AM
(#5624550)
inotify consumes resources (ram), which a hook into a package manager does not. you cannot watch all subdirectories within /etc with one handle, so you will have to recursively setup handles for all subdirectories. then, you might run into the max_user_watches limit (see sysctl fs.inotify.max_user_watches).
[ Parent
| on HN ]
Re:Etckeeper lets you store changes in /etc to git
by tankenmate on Monday April 29, 2013 @05:28AM
(#5624983)
Acutally, using fanotify() you can watch a whole filesystem with one watcher; use FAN_MARK_MOUNT (inotify and fanotify both use the fsnotify subsystem in the kernel). So then you set a watch on either /etc (if it is separately mounted) or watch / and then ignore any paths that aren't in /etc.