summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-03-25 20:28:06 +0200
committerTom Gundersen <teg@jklm.no>2012-03-25 20:28:06 +0200
commit2f313dea7e7f4be58bb911596b3c85dcf0e09381 (patch)
treec9fa46d1da52f180aeef831facb9598a7c9531d3
parent650aa0db2bb92b6751461baf71df169dfd107cab (diff)
rc.shutdown: fix tearing down of encrypted devices2012.03.2
This should have been done together with cb1ddfc15431f2e6498c93cd4da53e14f1147659. Mea culpa. Signed-off-by: Tom Gundersen <teg@jklm.no>
-rwxr-xr-xrc.shutdown4
1 files 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 "