From a19114cf407a825477d2f4f2ba486a70dffe4eb6 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Tue, 18 Apr 2017 02:43:17 -0400 Subject: [PATCH] update for comments --- xCAT-test/autotest/testcase/passwd/case0 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/passwd/case0 b/xCAT-test/autotest/testcase/passwd/case0 index 74e7c52fc..656898d2a 100644 --- a/xCAT-test/autotest/testcase/passwd/case0 +++ b/xCAT-test/autotest/testcase/passwd/case0 @@ -223,17 +223,19 @@ cmd:gettab key=system passwd.password > /tmp/tmppassword check:rc==0 cmd:chtab key=system passwd.username=root passwd.password=`openssl passwd -1 abc123` check:rc==0 -cmd:gettab key=system passwd.password |grep '\$1\$' +cmd:gettab key=system passwd.password > /tmp/tmpcryptedpasswd check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 -cmd:grep '\$1\$' /install/autoinst/$$CN +cmd:grep '\$1\$' /install/autoinst/$$CN |awk -F " " '{print $3}' > /tmp/instcryptedpasswd +check:rc==0 +cmd:diff /tmp/tmpcryptedpasswd /tmp/instcryptedpasswd check:rc==0 cmd:oldpassword=`cat /tmp/tmppassword |sed 's/\"//g'`;oldcryptmethod=`cat /tmp/tmpcryptmethod |sed 's/\"//g'`;chtab key=system passwd.password=$oldpassword passwd.cryptmethod=$oldcryptmethod check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 -cmd:rm -rf /tmp/tmpcryptmethod /tmp/tmppassword +cmd:rm -rf /tmp/tmpcryptmethod /tmp/tmppassword /tmp/tmpcryptedpasswd /tmp/instcryptedpasswd end start:encrypted_passwd_openssl_diskless