Skip to content

Commit

Permalink
grub-btrfsd: error when inotifywait is not found
Browse files Browse the repository at this point in the history
Fix #227

Signed-off-by: Pascal Jäger <[email protected]>
  • Loading branch information
Schievel1 committed Nov 20, 2022
1 parent b2b5307 commit d406ce7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grub-btrfsd
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit d406ce7

Please sign in to comment.