Do not allow hibernation to be setup if its not supported

This commit is contained in:
David Heinemeier Hansson
2026-01-07 19:51:00 +01:00
parent f3b9a90120
commit 4bb8bfc44c

View File

@@ -3,6 +3,12 @@
# Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab, # Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab,
# adds a resume hook to mkinitcpio, and configures suspend-then-hibernate. # adds a resume hook to mkinitcpio, and configures suspend-then-hibernate.
if [[ ! -f /sys/power/image_size ]]; then
echo -e "\033[31mError: Hibernation is not supported on your system\033[0m" >&2
exit 1
fi
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf" MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf"
# Check if hibernation is already configured # Check if hibernation is already configured