From: Harald Hoyer Date: Wed, 17 Dec 2014 11:08:37 +0000 (+0100) Subject: resume: make use of systemd-hibernate-resume, if existant X-Git-Tag: 041~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=733c71ce9e2d161c9e04772aeb1c5fb38e3fcb3a;p=thirdparty%2Fdracut.git resume: make use of systemd-hibernate-resume, if existant In systemd mode, and if systemd-hibernate-resume exists, use it exclusively. --- diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh index dfd435070..7fe6df3a3 100755 --- a/modules.d/95resume/module-setup.sh +++ b/modules.d/95resume/module-setup.sh @@ -33,6 +33,15 @@ install() { [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" fi + # if systemd is included and has the hibernate-resume tool, use it and nothing else + if dracut_module_included "systemd" && [[ -x $systemdutildir/systemd-hibernate-resume ]]; then + inst_multiple -o \ + $systemdutildir/system-generators/systemd-hibernate-resume-generator \ + $systemdsystemunitdir/systemd-hibernate-resume@.service \ + $systemdutildir/systemd-hibernate-resume + return 0 + fi + # Optional uswsusp support for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume do