grub-btrfsd: error when inotifywait is not found

Fix #227

Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
This commit is contained in:
Pascal Jäger
2022-11-20 21:34:40 +01:00
parent b2b5307fe4
commit d406ce795c

View File

@@ -120,6 +120,12 @@ shift $(( OPTIND - 1 ))
snapshots="${1}"
# check if inotify exists, see issue #227
if ! command -v inotifywait &> /dev/null; then
err "[!] inotifywait was not found, exiting. Is inotify-tools installed?" "${RED}" >&2
exit 1
fi
if [ ${#logfile} -gt 1 ]; then
touch "${logfile}"
echo "GRUB-BTRFSD log $(date)" >> "${logfile}"