Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3C1BB21290DF2 for ; Wed, 12 Jun 2019 16:05:33 -0700 (PDT) Date: Wed, 12 Jun 2019 16:08:45 -0700 From: Alison Schofield Subject: [ndctl PATCH] ndctl, test: handle backup_keys in security.sh Message-ID: <20190612230845.GA13679@alison-desk.jf.intel.com> MIME-Version: 1.0 Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: linux-nvdimm@lists.01.org List-ID: Fix a typo in security.sh that causes a script failure when an nvdimm-master.blob already exists and needs to be backed up. + setup_keys + '[' '!' -d /etc/ndctl/keys ']' + '[' -f /etc/ndctl/keys/nvdimm-master.blob ']' + mv /etc/ndctl/keys/nvdimm-master.blob /etc/ndctl/keys/nvdimm-master.blob.bak + 0=1 ./security.sh: line 39: 0=1: command not found Fixes: ba35642d3815 ("ndctl: add a load-keys test in the security unit test") Signed-off-by: Alison Schofield --- test/security.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/security.sh b/test/security.sh index 8a36265..c86d2c6 100755 --- a/test/security.sh +++ b/test/security.sh @@ -36,11 +36,11 @@ setup_keys() if [ -f "$masterpath" ]; then mv "$masterpath" "$masterpath.bak" - $backup_key=1 + backup_key=1 fi if [ -f "$keypath/tpm.handle" ]; then mv "$keypath/tpm.handle" "$keypath/tmp.handle.bak" - $backup_handle=1 + backup_handle=1 fi dd if=/dev/urandom bs=1 count=32 2>/dev/null | keyctl padd user "$masterkey" @u -- 2.21.0 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm