From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-px0-f178.google.com (mail-px0-f178.google.com [209.85.212.178]) by mail.saout.de (Postfix) with ESMTP for ; Fri, 7 Jan 2011 11:34:04 +0100 (CET) Received: by pxi9 with SMTP id 9so4366633pxi.37 for ; Fri, 07 Jan 2011 02:34:03 -0800 (PST) Message-ID: <4D26EC06.2090807@gmail.com> Date: Fri, 07 Jan 2011 18:33:42 +0800 From: Aaron Lewis MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [dm-crypt] What's the best way to check if device is already deactivated ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Hi, Planning to post a patch within a shell script , how about simply check if /dev/mapper/DEV_NAME exist is well enough ? if [ -e /dev/mapper/$target ];then ... else ... fi Thanks. -- Best Regards, Aaron Lewis - PGP: 0xDFE6C29E ( http://keyserver.veridis.com ) Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E