Fix offline auth and DNS failure handling #28

Merged
obel1x merged 4 commits from unbrot/fedora-OEMDRV:main into main 2026-05-07 12:46:16 +02:00
Showing only changes of commit 253030228f - Show all commits
+17
View File
@@ -17,6 +17,23 @@ if [ "$EUID" -eq 0 ]; then
echo "Press any key to continue" && read -n 1 -s -r && exit 1 echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi fi
# Check DNS resolution before proceeding - logon depends on IPA and Nextcloud being reachable
_dns_target="${SERVERFQDN_IPA}"
while ! getent hosts "${_dns_target}" >/dev/null 2>&1; do
elog_add "Warning: DNS resolution failed for ${_dns_target} - network or DNS not ready."
echo ""
echo "Warning: DNS resolution failed for ${_dns_target}."
echo "Please check your network connection and DNS settings before continuing."
echo ""
printf " [R]etry [C]ontinue anyway [Q]uit: "
read -r _dns_choice
case "${_dns_choice}" in
[Cc]) elog_add "Continuing despite DNS failure (user choice)."; break ;;
[Qq]) elog_add "Script aborted by user due to DNS failure."; exit 1 ;;
*) elog_add "Retrying DNS check for ${_dns_target}..." ;;
esac
done
#Check for needed python-modules #Check for needed python-modules
#For WEBDAV #For WEBDAV
python -c "import webdav3">/dev/null 2>&1 python -c "import webdav3">/dev/null 2>&1