[projects/geninitrd] Prefer suspend/resume binary over initrd/resume. Install previously found binary instead hardcoded o

arekm arekm at pld-linux.org
Thu Mar 26 13:26:20 CET 2015


commit ace0a232791812ed503f131a5653c251b9fe1099
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Mar 26 13:26:16 2015 +0100

    Prefer suspend/resume binary over initrd/resume. Install previously found binary instead hardcoded one.

 mod-suspend.sh | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/mod-suspend.sh b/mod-suspend.sh
index 48efd57..d905bd0 100644
--- a/mod-suspend.sh
+++ b/mod-suspend.sh
@@ -13,7 +13,7 @@ setup_mod_suspend() {
 		warn "Tuxonice and mainline suspend are exclusive!"
 	fi
 
-	resume=$(find_tool $initrd_dir/resume /usr/${_lib}/suspend/resume /usr/sbin/resume)
+	resume=$(find_tool /usr/${_lib}/suspend/resume $initrd_dir/resume /usr/sbin/resume)
 
 	if [ ! -x "$resume" ] || [ ! -f /etc/suspend.conf ]; then
 		USE_SUSPEND=no
@@ -58,11 +58,7 @@ initrd_gen_suspend() {
 	inst $resume_dev $resume_dev
 
 	inst /etc/suspend.conf /etc/suspend.conf
-	if [ -x /usr/${_lib}/suspend/resume ]; then
-		inst_exec /usr/${_lib}/suspend/resume /bin/resume
-	else
-		inst_exec /usr/sbin/resume /bin/resume
-	fi
+	inst_exec $resume /bin/resume
 
 	add_linuxrc <<-'EOF'
 	resume=no
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/geninitrd.git/commitdiff/ace0a232791812ed503f131a5653c251b9fe1099



More information about the pld-cvs-commit mailing list