We need a reverse *numeric* sort. Signed-off-by: Ben Hutchings <[email protected]> --- hooks/resume | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hooks/resume b/hooks/resume
index 657775e4a465..c43badd03f71 100755
--- a/hooks/resume
+++ b/hooks/resume
@@ -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
signature.asc
Description: Digital signature

