Use dd/sha1sum commands to generate checkpoint keys, instead of date/sha1sum command

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12984 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2012-06-01 06:33:07 +00:00
parent 74f825bdbb
commit 27088833fe

View File

@ -90,8 +90,8 @@ fi
#Generate checkpoint key and store it into the image, ckpt script could ust it after boot.
if [ "$OS" != "AIX" ]; then
KEY=$(date | sha1sum | awk '{ print $1 }')
# KEY=$(dd if=/dev/random bs=1 | sha1sum | awk '{ print $1 }')
#KEY=$(date | sha1sum | awk '{ print $1 }')
KEY=$(dd if=/dev/random count=1 2>/dev/null | sha1sum | awk '{print $1}')
echo $KEY > $installroot/root/.ckpt.key
chmod 400 $installroot/root/.ckpt.key
fi