diff --git a/system_setup/logon_script.sh b/system_setup/logon_script.sh index 8d33498..ce54ce2 100755 --- a/system_setup/logon_script.sh +++ b/system_setup/logon_script.sh @@ -41,7 +41,8 @@ fi if [ $? -ne 0 ]; then elog_add "Some Error when mounting private Directory, cannot continue. Your Data will not be available." elog_add "If you want to redo this script here, execute ${SCRIPTPATH}/${SCRIPTNAME}" - read -n 1 -s -r -p "Press any key to continue" + echo "Press any key to continue" + read -n 1 -s -r exit 1 fi diff --git a/system_setup/mount_ecrypt_home.sh b/system_setup/mount_ecrypt_home.sh index 517da72..9395692 100755 --- a/system_setup/mount_ecrypt_home.sh +++ b/system_setup/mount_ecrypt_home.sh @@ -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 ) diff --git a/system_setup/mozilla_starter.sh b/system_setup/mozilla_starter.sh index 1d1d288..68f619c 100755 --- a/system_setup/mozilla_starter.sh +++ b/system_setup/mozilla_starter.sh @@ -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