Refactoring repository...
Some checks are pending
Check Conventional Commit / check-commit-message (push) Waiting to run

This commit is contained in:
CELESTIFYX
2025-01-14 19:02:06 +02:00
parent 876fa0988e
commit 08abac9e7d
33171 changed files with 4677 additions and 761 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Check if /proc/cmdline exists
if [[ -f "/proc/cmdline" ]]; then
# Check if booting from a Btrfs snapshot
if grep -qE 'subvol=@/.snapshots/[0-9]+/snapshot' /proc/cmdline; then
echo "Booting from a Btrfs snapshot.";
exit 0
else
echo "Not booting from a Btrfs snapshot.";
exit 1
fi
else
# Handle the case where /proc/cmdline is missing
echo "Error: /proc/cmdline not found.";
exit 2
fi