inotify invalid option
Code of Conduct
- [x] I promise that i have used markdown syntax to make the code more readable which helps to fix the problem and that I have tested the --fix command mentioned above without success.
What happened
I just installed inotify-tools on my qidi plus 4, which is debian buster based (end of life). I updated my /etc/apt/sources.list to point to archive to get the system to pull the latest from debian to install inotify.
I bounced the klipper-backup-filewatch.service and it fails.
Oct 29 14:58:30 mkspi systemd[1]: klipper-backup-filewatch.service: Succeeded.
Oct 29 15:58:24 mkspi systemd[1]: Started Klipper Backup Filewatch Service.
Oct 29 15:58:25 mkspi env[4667]: inotifywait: invalid option -- 'P'
What did you expect to happen
it should work?
How to reproduce
install inotify-tools install the backup service check status
Debug
mks@mkspi:/etc/apt$ sudo systemctl daemon-reload
mks@mkspi:/etc/apt$ sudo systemctl restart klipper-backup-
klipper-backup-filewatch.service klipper-backup-on-boot.service
mks@mkspi:/etc/apt$ sudo systemctl restart klipper-backup-filewatch.service
mks@mkspi:/etc/apt$ sudo systemctl restart klipper-backup-on-boot.service
mks@mkspi:/etc/apt$ systemctl status klipper-backup-filewatch.service
● klipper-backup-filewatch.service - Klipper Backup Filewatch Service
Loaded: loaded (/etc/systemd/system/klipper-backup-filewatch.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Oct 29 14:58:29 mkspi systemd[1]: Started Klipper Backup Filewatch Service.
Oct 29 14:58:30 mkspi env[1499]: /home/mks/klipper-backup/utils/filewatch.sh: line 22: inotifywait: command not found
Oct 29 14:58:30 mkspi systemd[1]: klipper-backup-filewatch.service: Succeeded.
Oct 29 15:58:24 mkspi systemd[1]: Started Klipper Backup Filewatch Service.
Oct 29 15:58:25 mkspi env[4667]: inotifywait: invalid option -- 'P'
Oct 29 15:58:25 mkspi systemd[1]: klipper-backup-filewatch.service: Succeeded.
Additional information
No response
mks@mkspi:/etc/apt$ inotifywait --help
inotifywait 3.14
Wait for a particular event on a file or set of files.
Usage: inotifywait [ options ] file1 [ file2 ] [ file3 ] [ ... ]
Options:
-h|--help Show this help text.
@<file> Exclude the specified file from being watched.
--exclude <pattern>
Exclude all events on files matching the
extended regular expression <pattern>.
--excludei <pattern>
Like --exclude but case insensitive.
-m|--monitor Keep listening for events forever. Without
this option, inotifywait will exit after one
event is received.
-d|--daemon Same as --monitor, except run in the background
logging events to a file specified by --outfile.
Implies --syslog.
-r|--recursive Watch directories recursively.
--fromfile <file>
Read files to watch from <file> or `-' for stdin.
-o|--outfile <file>
Print events to <file> rather than stdout.
-s|--syslog Send errors to syslog rather than stderr.
-q|--quiet Print less (only print events).
-qq Print nothing (not even events).
--format <fmt> Print using a specified printf-like format
string; read the man page for more details.
--timefmt <fmt> strftime-compatible format string for use with
%T in --format string.
-c|--csv Print events in CSV format.
-t|--timeout <seconds>
When listening for a single event, time out after
waiting for an event for <seconds> seconds.
If <seconds> is 0, inotifywait will never time out.
-e|--event <event1> [ -e|--event <event2> ... ]
Listen for specific event(s). If omitted, all events are
listened for.
Exit status:
0 - An event you asked to watch for was received.
1 - An event you did not ask to watch for was received
(usually delete_self or unmount), or some error occurred.
2 - The --timeout option was given and no events occurred
in the specified interval of time.
Events:
access file or directory contents were read
modify file or directory contents were written
attrib file or directory attributes changed
close_write file or directory closed, after being opened in
writable mode
close_nowrite file or directory closed, after being opened in
read-only mode
close file or directory closed, regardless of read/write mode
open file or directory opened
moved_to file or directory moved to watched directory
moved_from file or directory moved from watched directory
move file or directory moved to or from watched directory
create file or directory created within watched directory
delete file or directory deleted within watched directory
delete_self file or directory was deleted
unmount file system containing file or directory unmounted
You are running inotifywait 3.14 instead of the latest release inotifywait 4.23.9.0 (source). The current version supports -P:
user@voron:~ $ inotifywait --help
inotifywait 4.23.9.0
Wait for a particular event on a file or set of files.
Usage: inotifywait [ options ] file1 [ file2 ] [ file3 ] [ ... ]
Options:
-h|--help Show this help text.
@<file> Exclude the specified file from being watched.
--exclude <pattern>
Exclude all events on files matching the
extended regular expression <pattern>.
Only the last --exclude option will be
taken into consideration.
--excludei <pattern>
Like --exclude but case insensitive.
--include <pattern>
Exclude all events on files except the ones
matching the extended regular expression
<pattern>.
--includei <pattern>
Like --include but case insensitive.
-m|--monitor Keep listening for events forever or until --timeout expires.
Without this option, inotifywait will exit after one event is received.
-d|--daemon Same as --monitor, except run in the background
logging events to a file specified by --outfile.
Implies --syslog.
-P|--no-dereference
Do not follow symlinks.
-r|--recursive Watch directories recursively.
-I|--inotify Watch with inotify.
-F|--fanotify Watch with fanotify.
-S|--filesystem Watch entire filesystem with fanotify.
--fromfile <file>
Read files to watch from <file> or `-' for stdin.
-o|--outfile <file>
Print events to <file> rather than stdout.
-s|--syslog Send errors to syslog rather than stderr.
-q|--quiet Print less (only print events).
-qq Print nothing (not even events).
--format <fmt> Print using a specified printf-like format
string; read the man page for more details.
--no-newline Don't print newline symbol after
--format string.
--timefmt <fmt> strftime-compatible format string for use with
%T in --format string.
-c|--csv Print events in CSV format.
-t|--timeout <seconds>
When listening for a single event, time out after
waiting for an event for <seconds> seconds.
If <seconds> is zero, inotifywait will never time out.
-e|--event <event1> [ -e|--event <event2> ... ]
Listen for specific event(s). If omitted, all events are
listened for.
The Klipper-Backup install script downloads and builds inotify with the latest release with make. So no apt magic. Maybe this could help.
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.