forked from obel1x/fedora-OEMDRV
Crypt: Better check for configured
This commit is contained in:
@@ -80,13 +80,14 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "${ENCKEY}." == "." ]; then
|
if [ "${ENCKEY}." == "." ]; then
|
||||||
echo "Some Error while fetching your Credentials. This should not happen. Quit."
|
echo "Some Error while fetching your IPA Vault Key. This should not happen. Quit."
|
||||||
rm /var/tmp/IPAVAULTKEY.txt
|
rm /var/tmp/IPAVAULTKEY.txt
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
echo "Sucessfuly obtained IPA vault fileencryption key."
|
||||||
|
|
||||||
#Setup and use encrypted filesystem
|
#Setup and use encrypted filesystem
|
||||||
if [ ! -d "${DECRYPTEDDATADIR}" ]; then
|
if [ ! -d "${DECRYPTEDDATADIR}" ] || [ -f "${HOME}/.config/gocryptfs/gocryptfs.conf" ]; then
|
||||||
#Key has been obtained, but no Directory was created till know
|
#Key has been obtained, but no Directory was created till know
|
||||||
echo "First Setup of encryption: Creating new Directories now"
|
echo "First Setup of encryption: Creating new Directories now"
|
||||||
mkdir -p ${ENCRYPTEDDATADIR} ${DECRYPTEDDATADIR} ${HOME}/.config/gocryptfs
|
mkdir -p ${ENCRYPTEDDATADIR} ${DECRYPTEDDATADIR} ${HOME}/.config/gocryptfs
|
||||||
@@ -100,6 +101,6 @@ if [ ${RETVAL} -eq 0 ]; then
|
|||||||
echo "Sucessfully mounted encrypted private Directory ${DECRYPTEDDATADIR}"
|
echo "Sucessfully mounted encrypted private Directory ${DECRYPTEDDATADIR}"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Errorcode ${RETAVAL}"
|
echo "Errorcode ${RETVAL}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user