aboutsummaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
authorSeblu <seblu@seblu.net>2011-02-11 01:48:03 +0100
committerThomas Bächler <thomas@archlinux.org>2011-02-27 11:48:48 +0100
commitee3385a97bef10fc20ed8c04e1b0dee0d5f0194c (patch)
tree87b79b97e25e708fe1c813a09b1b5d839b648361 /rc.shutdown
parent96d9cf3c924d27cef23967e9427c18c34395d532 (diff)
downloadinitscripts-ee3385a97bef10fc20ed8c04e1b0dee0d5f0194c.tar.xz
Improve encrypted filesystem detection
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown18
1 files changed, 9 insertions, 9 deletions
diff --git a/rc.shutdown b/rc.shutdown
index 8a63966..0acca49 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -72,17 +72,17 @@ stat_busy "Unmounting Filesystems"
stat_done
# Kill non-root encrypted partition mappings
-if [[ -f /etc/crypttab && $CS ]]; then
+if [[ -f /etc/crypttab && -n $CS ]] && /bin/grep -q ^[^#] /etc/crypttab; then
stat_busy "Deactivating encrypted volumes:"
do_lock() {
- stat_append "${1}.."
- if $CS remove "$1" >/dev/null 2>&1; then
- stat_append "ok "
- else
- stat_append "failed "
- fi
- }
- read_crypttab do_lock
+ stat_append "${1}.."
+ if $CS remove "$1" >/dev/null 2>&1; then
+ stat_append "ok "
+ else
+ stat_append "failed "
+ fi
+ }
+ read_crypttab do_lock
stat_done
fi