diff options
author | Thomas Bächler <thomas@archlinux.org> | 2006-12-16 22:03:29 +0000 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2006-12-16 22:03:29 +0000 |
commit | 9b58da29d7ce93bf3dc258a28d2fae00eb181f7e (patch) | |
tree | 6cdc8ad24e4146b32d31355a08ce6642337f9773 /rc.shutdown | |
parent | 567edd5aa95d5728b50f9fff6d71c368a7f3966a (diff) |
rc.sysinit, rc.shutdown:
- Code cleanup
- Added "verbose" commandline option for debugging
- Fixed #5968
- Fixed #4648
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-x | rc.shutdown | 17 |
1 files changed, 16 insertions, 1 deletions
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 </etc/crypttab + stat_done +fi + if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then if [ -d /etc/lvm -a -x /sbin/lvm ]; then /bin/mount -n -t sysfs none /sys 2>/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 |