mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 10:30:43 +01:00
imfile: Initial implementation of solaris FEN API (without wildcards) FEN API is used to implement simular event based file monitoring like with inotify. This commit provides partial functionality. It supports event-driven processing of files but does not yet provide wildcard functionality. Wildscards will be provided by a later commit. This can be committed as-is because the previous code did also not provide wildcard support, so this is an improvement for Solaris in any case. see also https://github.com/rsyslog/rsyslog/issues/1954
27 lines
820 B
Bash
Executable File
27 lines
820 B
Bash
Executable File
#!/bin/bash
|
|
# add 2016-11-22 by Pascal Withopf, released under ASL 2.0
|
|
echo [imfile-file-not-found-error.sh]
|
|
. $srcdir/diag.sh check-inotify
|
|
. $srcdir/diag.sh init
|
|
. $srcdir/diag.sh generate-conf
|
|
. $srcdir/diag.sh add-conf '
|
|
module(load="../plugins/imfile/.libs/imfile")
|
|
|
|
input(type="imfile" File="testsuites/NotExistingInputFile" Tag="tag1" fileNotFoundError="off")
|
|
|
|
action(type="omfile" file="rsyslog.out.log")
|
|
'
|
|
. $srcdir/diag.sh startup
|
|
. $srcdir/diag.sh shutdown-when-empty
|
|
. $srcdir/diag.sh wait-shutdown
|
|
|
|
grep "error*file*NotExistingInputFile*No such file or directory" rsyslog.out.log > /dev/null
|
|
if [ $? -eq 0 ]; then
|
|
echo
|
|
echo "FAIL: error message from missing input file found. rsyslog.out.log is:"
|
|
cat rsyslog.out.log
|
|
. $srcdir/diag.sh error-exit 1
|
|
fi
|
|
|
|
. $srcdir/diag.sh exit
|