diff options
author | Harald Hoyer <harald@redhat.com> | 2013-07-18 14:41:31 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-07-18 14:41:31 +0200 |
commit | 34b56de12aad622d602d6e3bd434e02c840f1cd0 (patch) | |
tree | 9adca2239d01fa892db96e3af9917d739e2e1263 /modules.d | |
parent | 951cedf8cb2228dc3064d5fde727543d96d23e5b (diff) | |
download | dracut-34b56de12aad622d602d6e3bd434e02c840f1cd0.tar.gz dracut-34b56de12aad622d602d6e3bd434e02c840f1cd0.tar.bz2 dracut-34b56de12aad622d602d6e3bd434e02c840f1cd0.zip |
resume: do not include in hostonly, if no swap is present
Diffstat (limited to 'modules.d')
-rwxr-xr-x | modules.d/95resume/module-setup.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh index 2f647931..7f810499 100755 --- a/modules.d/95resume/module-setup.sh +++ b/modules.d/95resume/module-setup.sh @@ -2,6 +2,18 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh +check() { + # No point trying to support resume, if no swap partition exist + [[ $hostonly ]] || [[ $mount_needs ]] && { + for fs in "${host_fs_types[@]}"; do + [[ $fs = swap ]] && return 0 + done + return 255 + } + + return 0 +} + install() { local _bin # Optional uswsusp support |