diff options
Diffstat (limited to 'dotfiles/system/.local/bin/zfsrollback')
| -rwxr-xr-x | dotfiles/system/.local/bin/zfsrollback | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dotfiles/system/.local/bin/zfsrollback b/dotfiles/system/.local/bin/zfsrollback index a03cd57..6e727e2 100755 --- a/dotfiles/system/.local/bin/zfsrollback +++ b/dotfiles/system/.local/bin/zfsrollback @@ -110,6 +110,16 @@ echo "════════════════════════ echo " ⚠️ WARNING ⚠️" echo "═══════════════════════════════════════════════════════════════════" echo "" + +# Special warning for genesis rollback +if [[ "$snap_name" == "genesis" ]]; then + echo " 🚨 GENESIS ROLLBACK DETECTED 🚨" + echo "" + echo " Rolling back to genesis will destroy ALL changes since installation!" + echo " This includes all packages installed, configurations, and user data." + echo "" +fi + echo "You are about to roll back to snapshot: @${snap_name}" echo "" echo "The following datasets will be rolled back:" @@ -160,6 +170,14 @@ done echo "" if [ $failed -eq 0 ]; then echo "Rollback complete." + + # Update GRUB boot menu if grub-zfs-snap is available + # (destroyed snapshots need to be removed from menu) + if command -v grub-zfs-snap &> /dev/null; then + echo "" + echo "Updating GRUB boot menu..." + grub-zfs-snap + fi else echo "Rollback completed with $failed failure(s)" exit 1 |
