Commit 71cfb7f6 authored by Ben Hutchings's avatar Ben Hutchings

hooks/resume: Use correct sort options to select the biggest swap partition

We need a reverse *numeric* sort.
Signed-off-by: 's avatarBen Hutchings <ben@decadent.org.uk>
parent d192814c
......@@ -29,7 +29,7 @@ if [ ! -r /proc/swaps ]; then
fi
# Try to autodetect the RESUME partition, using biggest swap?
RESUME=$(grep ^/dev/ /proc/swaps | sort -rk3 | head -n 1 | cut -d " " -f 1)
RESUME=$(grep ^/dev/ /proc/swaps | sort -rnk3 | head -n 1 | cut -d " " -f 1)
if [ -n "$RESUME" ]; then
UUID=$(blkid -s UUID -o value "$RESUME" || true)
if [ -n "$UUID" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment