diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-07-14 20:24:27 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-07-14 20:24:27 -0300 |
commit | 629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b (patch) | |
tree | aa8871b266a7731db028b31d74adcd0251e7d1b6 | |
parent | bed5d4a438fac2dc0b2fa33d65748028a20c754b (diff) | |
download | kvmx-629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b.tar.gz kvmx-629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b.tar.bz2 |
Fix: kvmx: inotify: restrict events
-rwxr-xr-x | kvmx | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -2582,8 +2582,19 @@ function kvmx_inotify { exit 1 fi + # Exclude "access", "close", "close_write", "close_nowrite", "open" from the list of events + local args + local event + local events="modify attrib moved_to moved_from move" + events="$events move_self create delete delete_self unmount" + + # Build arg list of events + for event in $events; do + args="$args -e $event" + done + # Dispatch - while inotifywait -r $watched; do + while inotifywait $args -r $watched; do echo "$command" | kvmx_ssh done } |