aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrc.shutdown14
1 files changed, 8 insertions, 6 deletions
diff --git a/rc.shutdown b/rc.shutdown
index 623146e..b0de393 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -109,12 +109,14 @@ if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)"
CS=/sbin/cryptsetup.static
do_uncrypt() {
if [ $# -ge 3 ]; then
- stat_append "${1}.."
- $CS remove $1 >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- stat_append "failed "
- else
- stat_append "ok "
+ if [ -b /dev/mapper/$1 ] ;then
+ stat_append "${1}.."
+ $CS remove $1 >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ stat_append "failed "
+ else
+ stat_append "ok "
+ fi
fi
fi
}