home: hub: mkinitfs

Download patch

ref: d1b64b994ac6302cf1ab90c3e92f5d4c0ccc84b6
parent: a4d6120aa949cdb6d18eb8241c4706f96685a359
author: Alan Diwix <alandiwix@yandex.ru>
date: Mon Jun 7 09:52:36 CDT 2021

Find resume device by UUID or LABEL

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -515,7 +515,11 @@
 	if [ -n "$KOPT_resume" ]; then
 		echo "Resume from disk"
 		if [ -e /sys/power/resume ]; then
-			printf "%d:%d" $(stat -Lc "0x%t 0x%T" "$KOPT_resume") >/sys/power/resume
+			case "$KOPT_resume" in
+			UUID*|LABEL*) resume_dev=$(findfs "$KOPT_resume");;
+			*) resume_dev="$KOPT_resume";;
+			esac
+			printf "%d:%d" $(stat -Lc "0x%t 0x%T" "$resume_dev") >/sys/power/resume
 		else
 			echo "resume: no hibernation support found"
 		fi