From 9b58da29d7ce93bf3dc258a28d2fae00eb181f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Sat, 16 Dec 2006 22:03:29 +0000 Subject: rc.sysinit, rc.shutdown: - Code cleanup - Added "verbose" commandline option for debugging - Fixed #5968 - Fixed #4648 --- rc.shutdown | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'rc.shutdown') diff --git a/rc.shutdown b/rc.shutdown index d0a094e..31c1fa3 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -76,12 +76,27 @@ stat_busy "Unmounting Filesystems" /bin/umount -a stat_done +# Kill non-root encrypted partition mappings +if [ -f /etc/crypttab -a -n "$(grep -v ^# /etc/crypttab | grep -v ^$)" ]; then + stat_busy "Deactivating encrypted volumes" + CS=/sbin/cryptsetup.static + do_uncrypt() { + if [ $# -ge 3 ]; then + $CS remove $1 >/dev/null 2>&1 + fi + } + while read line; do + eval do_uncrypt "$line" + done /dev/null if [ -d /sys/block ]; then stat_busy "Deactivating LVM2 groups" - /sbin/lvm vgchange --ignorelockingfailure -a n + /sbin/lvm vgchange --ignorelockingfailure -an >/dev/null 2>&1 stat_done umount /sys fi -- cgit v1.2.3