aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-14 20:28:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-14 20:28:58 -0300
commit7edcf1ac4dd21a48b66195119f9708b30d799724 (patch)
tree3cd29e26b3a3bbeee725f8e204873dc1c6aaa6da
parent629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b (diff)
downloadkvmx-7edcf1ac4dd21a48b66195119f9708b30d799724.tar.gz
kvmx-7edcf1ac4dd21a48b66195119f9708b30d799724.tar.bz2
Feat: kvmx: inotify: adds inotify_events configuration parameter
-rwxr-xr-xkvmx11
-rw-r--r--kvmxfile8
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"