base: Don't wait for swap devices in host-only mode.
commit3e3ed34f036a833ccc2150c6224d0a954e841e39
authorColin Guthrie <colin@mageia.org>
Fri, 15 May 2015 13:53:40 +0000 (15 14:53 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 15 May 2015 14:01:41 +0000 (15 16:01 +0200)
tree6a9aca5c2327855adc55cb13b75470ac312bf67c
parent50f8ae457c9c59a763dfe78ab442982c02cd4023
base: Don't wait for swap devices in host-only mode.

The only reason we add swap devices to host-only mode (added in
dd5875499ece9dbc90e10eafd0073ee15d0c86a4) is to allow us to process
resume= arguments passed on the kernel command line when the swap
partition lives on something slightly more complex than a normal
partion (e.g. in an LVM or RAID setup).

By adding the device to host_devs, the necessary LVM and RAID hooks
are added and thus the underlying storage will be initialised OK, and
the 95resume module handles the waiting for the device (via udev rules
creating the /dev/resume symlink).

So ultimately, we do not need to hard-code the waiting for the swap
devices into the initramfs at build time as the waiting part can be
dynamic.

This makes things more resiliant to swap partitions disappearing and
being reformatted etc.

Inspired by a patch by Martin Whitaker on Mageia bug:
https://bugs.mageia.org/show_bug.cgi?id=12305
dracut.sh
modules.d/99base/module-setup.sh