forked from obel1x/fedora-OEMDRV
Fixed checking for correct mount of encrypted directory
This commit is contained in:
@@ -13,6 +13,18 @@ if [ "${DAVTOKEN_USER}." == "." ]; then
|
||||
get_nc_token
|
||||
fi
|
||||
|
||||
#Check if encrypted Dir is mounted
|
||||
if [ ${IPAVAULTUSE} == "true" ]; then
|
||||
grep ${DECRYPTEDDATADIR} /etc/mtab >/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: IPAVAULTUSE is set to true, but the Directory is not mounted. "
|
||||
echo "Press any key to continue"
|
||||
read -n 1 -s -r
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use optional Profilename
|
||||
profilename=${3:-"default"}
|
||||
|
||||
@@ -73,7 +85,8 @@ if [[ $? -ne 0 ]]; then
|
||||
echo "****"
|
||||
echo ""
|
||||
echo "Please check if your Token is setup right and for the Output"
|
||||
read -n 1 -s -r -p "Press any key to continue"
|
||||
echo "Press any key to continue"
|
||||
read -n 1 -s -r
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
@@ -87,7 +100,8 @@ if [ "${RUNCMD}." != "." ]; then
|
||||
echo "****"
|
||||
echo ""
|
||||
echo "Error running ${1}, not syncing Profile!"
|
||||
read -n 1 -s -r -p "Press any key to continue"
|
||||
echo "Press any key to continue"
|
||||
read -n 1 -s -r
|
||||
echo ""
|
||||
exit 2
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user