]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
resume: fix swap detection in hostonly
authorAlexander Tsoy <alexander@tsoy.me>
Wed, 9 Oct 2013 02:39:46 +0000 (06:39 +0400)
committerHarald Hoyer <harald@redhat.com>
Wed, 9 Oct 2013 14:21:50 +0000 (16:21 +0200)
Check for other possible fs types. This fixes swap detection when using
TuxOnIce kernel.

Note that parse-resume.sh generate udev rules with support for
ID_FS_TYPE=suspend, but we do not include it here, because it is
libvolume_id thing and host_fs_types is populated using blkid.

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

index b6d2c486d714a9556dd55cd5d93b86c27d84cc63..8b3761689d75e99412133ebee5854931c68c4dae 100755 (executable)
@@ -7,7 +7,7 @@ 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
+            [[ $fs =~ ^(swap|swsuspend|swsupend)$ ]] && return 0
         done
         return 255
     }