summaryrefslogtreecommitdiffstats
path: root/shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'shutdown')
-rwxr-xr-xshutdown12
1 files changed, 8 insertions, 4 deletions
diff --git a/shutdown b/shutdown
index f664d6e..2e6f504 100755
--- a/shutdown
+++ b/shutdown
@@ -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