From 40da1e5a319a02f30c585e0e963e75e4257d2bf7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 2 Dec 2013 10:45:17 +0100 Subject: [PATCH] resume: autoconf resume --- modules.d/95resume/module-setup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh index a172c27..ceb7855 100755 --- a/modules.d/95resume/module-setup.sh +++ b/modules.d/95resume/module-setup.sh @@ -16,8 +16,23 @@ check() { } # called by dracut +cmdline() { + local _activated + declare -A _activated + + for dev in "${!host_fs_types[@]}"; do + [[ ${host_fs_types[$dev]} =~ ^(swap|swsuspend|swsupend)$ ]] || continue + printf "resume=%s " "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" + done +} + +# called by dracut install() { local _bin + + cmdline >> "${initdir}/etc/cmdline.d/95resume.conf" + echo >> "${initdir}/etc/cmdline.d/95resume.conf" + # Optional uswsusp support for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib/uswsusp/resume do