From b1e5752318112f192e670c06273253849a72d06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=C3=A4tzold?= Date: Thu, 12 Mar 2026 10:35:30 +0100 Subject: [PATCH] Improved errorhandling of sw install --- system_setup/logon_script.sh | 2 ++ system_setup/mozilla_starter.sh | 3 +-- system_setup/sync_client_software.sh | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/system_setup/logon_script.sh b/system_setup/logon_script.sh index a7051f9..8d33498 100755 --- a/system_setup/logon_script.sh +++ b/system_setup/logon_script.sh @@ -64,6 +64,8 @@ if [[ $INST_RET -ne 0 ]]; then elog_add "If you want to change this, make a FreeIPA sudoers rule for the script sync_client_software.sh with !authenticate for you and become a member." else elog_add "*** Error executing software sync and install, please check your output! ***" + # TODO: This is not working due to the above Command. Redesign command to make it work + exit 1 fi fi diff --git a/system_setup/mozilla_starter.sh b/system_setup/mozilla_starter.sh index 2161d15..1d1d288 100755 --- a/system_setup/mozilla_starter.sh +++ b/system_setup/mozilla_starter.sh @@ -53,11 +53,10 @@ if [[ ${BREAK_ERROR} == 1 ]]; then exit 1 fi -echo "Synchronise profile" # optional: -s = silentmodus SYNCCMD="/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloudcmd com.nextcloud.desktopclient.nextcloud -h -u ${DAVTOKEN_USER} -p ${DAVTOKEN_PASS} --path ${REMOTE_PATH}/${profilename} ${PROFILE_PATH}/${profilename} https://${SERVERFQDN_NC}" SYNCCMD_HIDDENPW=$( echo "${SYNCCMD/${DAVTOKEN_PASS}/***HIDDEN***}" ) -echo "Exec ${1} with Profile ${profilename}: ${SYNCCMD_HIDDENPW}" +echo "Synchronise ${1} with Profile ${profilename}: ${SYNCCMD_HIDDENPW}" mkdir -p ${TEMPDIR} echo "Mozilla Starter" > ${LOGFILE} echo "===============" >> ${LOGFILE} diff --git a/system_setup/sync_client_software.sh b/system_setup/sync_client_software.sh index 78ddd5e..a2e85a1 100755 --- a/system_setup/sync_client_software.sh +++ b/system_setup/sync_client_software.sh @@ -74,4 +74,7 @@ fi echo "Sucessfully synced." if [ $1 == "install" ]; then ${CLIENT_SOFTWARE_DST}/source/install.sh + if [ $? -ne 0 ]; then + exit 1 + fi fi