diff --git a/scripts/enable-hibernation.sh b/scripts/enable-hibernation.sh index a1fe9a0..eba5fe5 100755 --- a/scripts/enable-hibernation.sh +++ b/scripts/enable-hibernation.sh @@ -13,6 +13,7 @@ fi SWAPFILE=/swapfile SWAPSIZE=16g ROOT_PARTUUID=$(findmnt -no PARTUUID /) +[ -n "$ROOT_PARTUUID" ] || { echo "ERROR: could not determine root PARTUUID via findmnt." >&2; exit 1; } echo "==> Step 1/6: ensure swap file exists at $SWAPFILE (size $SWAPSIZE)" if [ ! -f "$SWAPFILE" ]; then