From 7edcf1ac4dd21a48b66195119f9708b30d799724 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 14 Jul 2024 20:28:58 -0300 Subject: Feat: kvmx: inotify: adds inotify_events configuration parameter --- kvmx | 11 +++++------ kvmxfile | 8 ++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/kvmx b/kvmx index b5098ea..27cb93e 100755 --- a/kvmx +++ b/kvmx @@ -2582,16 +2582,15 @@ 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 + if [ ! -z "$inotify_events" ]; then + for event in $inotify_events; do + args="$args -e $event" + done + fi # Dispatch while inotifywait $args -r $watched; do diff --git a/kvmxfile b/kvmxfile index af2b0d8..d6bca39 100644 --- a/kvmxfile +++ b/kvmxfile @@ -279,3 +279,11 @@ bootloader="grub" #export QEMU_AUDIO_DRV="pa" #export QEMU_PA_SAMPLES="8192" #export QEMU_AUDIO_TIMER_PERIOD="99" + +# Inotify events listened by the "inotify" action +# +# See inotifywait(0) for the full list and description of all supported events. +# +# By default, exclude "access", "close", "close_write", "close_nowrite", "open" +# from the list of events +inotify_events="modify attrib moved_to moved_from move move_self create delete delete_self unmount" -- cgit v1.2.3