Skip to content

Commit

Permalink
resume: make use of systemd-hibernate-resume, if existant
Browse files Browse the repository at this point in the history
In systemd mode, and if systemd-hibernate-resume exists, use it
exclusively.
  • Loading branch information
haraldh committed Dec 17, 2014
1 parent a17d5cf commit 733c71c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules.d/95resume/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected] \
$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
Expand Down

0 comments on commit 733c71c

Please sign in to comment.