[packages/geninitrd] - added swsusp support patch
mis
mis at pld-linux.org
Tue Mar 24 16:43:24 CET 2020
commit 11e97b61b0ffa0265f2dd6e8cce3870a36c826cc
Author: mis <mistoo at gmail.com>
Date: Tue Mar 24 16:38:55 2020 +0100
- added swsusp support patch
Detect resume=/dev/XXX kernel param and push it to /sys/power/resume.
geninitrd-swsusp.patch | 24 ++++++++++++++++++++++++
geninitrd.spec | 4 +++-
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/geninitrd.spec b/geninitrd.spec
index b2387aa..a38ca00 100644
--- a/geninitrd.spec
+++ b/geninitrd.spec
@@ -2,7 +2,7 @@ Summary: Creates an initial ramdisk image for preloading modules
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
@@ -10,6 +10,7 @@ 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
@@ -85,6 +86,7 @@ bieżących informacji zawartych w /etc/modules.conf.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__make}
diff --git a/geninitrd-swsusp.patch b/geninitrd-swsusp.patch
new file mode 100644
index 0000000..f34e909
--- /dev/null
+++ b/geninitrd-swsusp.patch
@@ -0,0 +1,24 @@
+--- 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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/geninitrd.git/commitdiff/11e97b61b0ffa0265f2dd6e8cce3870a36c826cc
More information about the pld-cvs-commit
mailing list