]> git.pld-linux.org Git - packages/geninitrd.git/commitdiff
- added swsusp support patch auto/th/geninitrd-12787-7
authormis <mistoo@gmail.com>
Tue, 24 Mar 2020 15:38:55 +0000 (16:38 +0100)
committermis <mistoo@gmail.com>
Tue, 24 Mar 2020 15:38:55 +0000 (16:38 +0100)
Detect resume=/dev/XXX kernel param and push it to /sys/power/resume.

geninitrd-swsusp.patch [new file with mode: 0644]
geninitrd.spec

diff --git a/geninitrd-swsusp.patch b/geninitrd-swsusp.patch
new file mode 100644 (file)
index 0000000..f34e909
--- /dev/null
@@ -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
index b2387aad836519c2107f4715de6003168e034fec..a38ca00d9a8986a84036eea1e28609a5a1edc7e1 100644 (file)
@@ -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}
This page took 0.125486 seconds and 4 git commands to generate.