Skip to content

Commit

Permalink
grub-btrfs: Add warning when there is no entry in grub.cfg
Browse files Browse the repository at this point in the history
Fix #219

Signed-off-by: Pascal Jäger <[email protected]>
  • Loading branch information
Schievel1 committed Nov 20, 2022
1 parent d406ce7 commit 75f7d85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 41_snapshots-btrfs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;

0 comments on commit 75f7d85

Please sign in to comment.