cmdline() prints empty "resume=" options for non-persistent swap devices, for example zram. Add a check for that. This patch also fixes printf formatting and removes unused variables. --- modules.d/95resume/module-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh index ceb7855..b1b4684 100755 --- a/modules.d/95resume/module-setup.sh +++ b/modules.d/95resume/module-setup.sh @@ -17,12 +17,12 @@ check() { # called by dracut cmdline() { - local _activated - declare -A _activated + local _resume 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")")" + _resume=$(shorten_persistent_dev "$(get_persistent_dev "$dev")") + [[ -n ${_resume} ]] && printf " resume=%s" "${_resume}" done } -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html