Fixed checking for correct mount of encrypted directory
This commit is contained in:
@@ -41,10 +41,7 @@ else
|
||||
echo "No Key found. Will try to Setup a new one."
|
||||
ENCKEY=$( openssl rand -base64 24 )
|
||||
echo ${ENCKEY} > /var/tmp/IPAVAULTKEY.txt
|
||||
ipa vault-add "${IPAVAULTNAME}" --desc "Key for Fileencrytption of ${HOSTNM}" --type=standard
|
||||
if [ $? -eq 0 ]; then
|
||||
ipa vault-archive "${IPAVAULTNAME}" --in /var/tmp/IPAVAULTKEY.txt
|
||||
fi
|
||||
ipa vault-add "${IPAVAULTNAME}" --desc "Key for Fileencrytption of ${HOSTNM}" --type=standard && ipa vault-archive "${IPAVAULTNAME}" --in /var/tmp/IPAVAULTKEY.txt
|
||||
if [ $? -eq 0 ]; then
|
||||
echo
|
||||
echo "Your Key has been sucessfully stored to the Vault ${IPAVAULTNAME}"
|
||||
@@ -59,6 +56,7 @@ else
|
||||
echo
|
||||
else
|
||||
echo "Failed to create the Vault. Please check the Errors and try again."
|
||||
ENCKEY=""
|
||||
fi
|
||||
else
|
||||
ENCKEY=$( cat /var/tmp/IPAVAULTKEY.txt )
|
||||
|
||||
Reference in New Issue
Block a user