]> git.ipfire.org Git - thirdparty/dracut.git/commit
90dm/dm-shutdown.sh: dmsetup remove_all -> dmsetup remove
authorLukas Wunner <lukas@wunner.de>
Tue, 3 Feb 2015 18:32:55 +0000 (19:32 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 19 Feb 2015 09:57:08 +0000 (10:57 +0100)
commit5729ae8029f9b19438f210f3e3ead326cf252645
treef3a535d7242263063ca6a42c7cc7cd919023967f
parenta7d3ad67c754c3078cd6c228a3807425417c8083
90dm/dm-shutdown.sh: dmsetup remove_all -> dmsetup remove

The function 99shutdown/shutdown.sh:_check_shutdown() assumes that
shutdown scripts report success or failure via their return value.
However, "dmsetup remove_all" always reports success, even if some
of the device mappings could not be removed.

I submitted a patch for dmsetup but the lvm2 folks rejected it,
asserting that its behaviour is correct, that "remove_all" should
only be used by developers and that the proper solution would be
to invoke "dmsetup remove" on each device. This does report success
or failure via the return value.

Apart from fixing that issue, this commit also adds the dmsetup
option "--noudevsync". Without it, dmsetup would hang after removal
of a device while trying to communicate with systemd-udevd, which
is no longer running at this shutdown stage.

[harald: replaces backticks with $() ]
modules.d/90dm/dm-shutdown.sh