Browse Source

resume: make use of systemd-hibernate-resume, if existant

In systemd mode, and if systemd-hibernate-resume exists, use it
exclusively.
master
Harald Hoyer 10 years ago
parent
commit
733c71ce9e
  1. 9
      modules.d/95resume/module-setup.sh

9
modules.d/95resume/module-setup.sh

@ -33,6 +33,15 @@ install() {
[[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf"
fi 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 # Optional uswsusp support
for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume
do do

Loading…
Cancel
Save