From 2f313dea7e7f4be58bb911596b3c85dcf0e09381 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 25 Mar 2012 20:28:06 +0200 Subject: rc.shutdown: fix tearing down of encrypted devices This should have been done together with cb1ddfc15431f2e6498c93cd4da53e14f1147659. Mea culpa. Signed-off-by: Tom Gundersen --- rc.shutdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc.shutdown b/rc.shutdown index 54a1e9a..ec30d56 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -65,14 +65,14 @@ status "Unmounting Non-API Filesystems" umount_all run_hook shutdown_postumount # Kill non-root encrypted partition mappings -if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then +if [[ -f /etc/crypttab ]] && type -p cryptsetup >/dev/null; then stat_busy "Deactivating encrypted volumes:" # Maybe someone has LVM on an encrypted block device # executing an extra vgchange is errorless [[ $USELVM = [Yy][Ee][Ss] ]] && vgchange --sysinit -a n &>/dev/null do_lock() { stat_append "${1}.." - if $CS remove "$1" &>/dev/null; then + if cryptsetup remove "$1" &>/dev/null; then stat_append "ok " else stat_append "failed " -- cgit v1.2.3-54-g00ecf