diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-03-28 15:44:54 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-04-02 00:29:55 +0200 |
commit | 5a309568167623677c6310e7de99c62c273d3de7 (patch) | |
tree | c420c50277e46cba4728c07ea4c809231cbfed24 /shutdown | |
parent | cdb5a31f09b3ca88ed1ece7663c69e2e2d630bf8 (diff) | |
download | mkinitcpio-5a309568167623677c6310e7de99c62c273d3de7.tar.gz mkinitcpio-5a309568167623677c6310e7de99c62c273d3de7.tar.xz |
shutdown: improve handling of dm devices
- use the 'remove' action for cryptsetup rather than luksClose
- handle dm devices with dmsetup, not lvm
- disable dmraid devices by name, instead of all at once
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'shutdown')
-rwxr-xr-x | shutdown | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -14,9 +14,13 @@ stop_device() { case $devtype in crypt) read devname <"$1/dm/name" - cryptsetup luksClose "$devname" + cryptsetup remove "$devname" ;; - dm|lvm) + dm) + read devname <"$1/dm/name" + dmsetup remove "$devname" + ;; + lvm) # disassemble the parent VG read devname <"$1/dm/name" lvm lvdisplay -c "/dev/mapper/$devname" | { @@ -28,8 +32,8 @@ stop_device() { mdadm --stop "/dev/$1" ;; dmraid) - # XXX: i have no idea how dmraid works - dmraid -an + read devname <"$1/dm/name" + dmraid -an "$devname" ;; # silently ignore unstacked devices esac |