Detect resume=/dev/XXX kernel param and push it to /sys/power/resume.
--- /dev/null
+--- geninitrd-12757/geninitrd.orig 2020-03-21 03:33:05.923455652 +0100
++++ geninitrd-12757/geninitrd 2020-03-21 04:48:42.054252108 +0100
+@@ -1613,6 +1613,10 @@
+ if [ "${arg##init=}" != "${arg}" ]; then
+ INIT=${arg##init=}
+ fi
++ # if resume param starts with /dev/ then trigger swsups with it
++ if [ "${arg##resume=/dev/}" != "${arg}" ]; then
++ RESUME=${arg##resume=}
++ fi
+ done
+
+ # handling of invalid, rootfsflags, option
+@@ -1708,6 +1712,10 @@
+ initrd_gen_tuxonice
+ initrd_gen_suspend
+
++add_linuxrc <<-'EOF'
++[ -n "$RESUME" ] && echo "$RESUME" > /sys/power/resume
++EOF
++
+ # clean up env
+ add_linuxrc <<-'EOF'
+ if [ ! "$DEBUGINITRD" ]; then
Summary(pl.UTF-8): Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu
Name: geninitrd
Version: 12787
-Release: 6
+Release: 7
License: GPL
Group: Applications/System
Source0: %{name}-%{version}.tar.gz
Patch0: %{name}-git.patch
Patch1: %{name}-static-dev.patch
Patch2: %{name}-posix-sh.patch
+Patch3: %{name}-swsusp.patch
URL: http://git.pld-linux.org/?p=projects/geninitrd.git
BuildRequires: xmlto >= 0:0.0.18-1
Requires: /usr/bin/ldd
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__make}