grub-btrfs: Add warning when there is no entry in grub.cfg

Fix #219

Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
This commit is contained in:
Pascal Jäger
2022-11-20 22:15:48 +01:00
parent d406ce795c
commit 75f7d85261

View File

@@ -575,3 +575,7 @@ EOF
else
print_error "Syntax errors are detected in generated grub-btrfs.cfg file."
fi
# warn when this script is run but there is no entry in grub.cfg
grep "snapshots-btrfs" "${grub_directory}/grub.cfg" || printf "\nWARNING: '%s' needs to run at least once to generate the snapshots (sub)menu entry in grub the main menu. \
After that this script can run alone to generate the snapshot entries.\n\n" "${GRUB_BTRFS_MKCONFIG:-grub-mkconfig}" >&2 ;