forked from obel1x/fedora-OEMDRV
Relocate dist files, fix path references, and misc script improvements
- Move setup_system.conf.dist to system_setup/config.dist/ and skel.tar.zst.dist + pack_skel.sh to system_setup/skel/; config/ now holds only gitignored local files - Fix configure.sh CONF_DIST path (was pointing at non-existent config/setup_system.conf.dist) - Fix skel/pack_skel.sh: remove vestigial source line whose path was wrong in both old and new location - Update error messages in setup_system.inc.sh and sync_client_software.sh to reference new dist file location - Move machine_uuid reading/writing into setup_system.inc.sh so all scripts have MACHINEID available; setup_system.conf.dist now uses MACHINEID conditionally with a hostname fallback - sync_client_software.sh: fix && / typo (should be && \) that broke the flatpak remote-add → install chain; add network error handling after flatpak install; cleanup upgrade logic and chown placement - Update CLAUDE.md and install.md to reflect new dist file locations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,15 +20,20 @@ fi
|
||||
|
||||
#Install or update Nextcloud com.nextcloud.desktopclient.nextcloud
|
||||
echo "Update or install Nextcloud client"
|
||||
/usr/bin/flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
/usr/bin/flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo && \
|
||||
/usr/bin/flatpak install -y --or-update --noninteractive flathub com.nextcloud.desktopclient.nextcloud && echo "Done Update/Install of Nextcloud."
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo ""
|
||||
echo "There seems to be a problem with your network connection. Please first check, if your network can be established before reuming."
|
||||
echo "You can press CRTL+C to abort now. Than your data wont be accessible and you need to run \"$0\" again."
|
||||
echo "You can also continue without network. You may need your personal encryptionkey for accessing your data."
|
||||
read -n 1 -s -r -p "Please check Network and press any Key to continue"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
#Sync remote Files
|
||||
#Do an upgrade of the Base package if its configured and if there are changes
|
||||
chown root:${CLIENTADMINGROUP} -R ${SYSCONFIGPATH}
|
||||
chmod ug+rwX,o=rX -R ${SYSCONFIGPATH}
|
||||
|
||||
#Do an upgrade of the Base package if its configured and if there are changes
|
||||
if [[ ! -z "${UPGRADEURL}" ]]; then
|
||||
echo "Checking for Upgrades on ${UPGRADEURL} and Branch ${UPGRADEBRANCH}"
|
||||
REMOTEURL=$( git config --get remote.origin.url )
|
||||
@@ -43,14 +48,17 @@ if [[ ! -z "${UPGRADEURL}" ]]; then
|
||||
else
|
||||
# Doing upgrade, discarding all local changes frist (is more save than forced pull)
|
||||
echo "Checks have passed, we are now upgrading via git."
|
||||
git fetch origin
|
||||
git reset --hard origin/${UPGRADEBRANCH}
|
||||
#Remove all history
|
||||
git rebase HEAD^
|
||||
#Fetch latest Updates and remove all history
|
||||
git fetch origin && git reset --hard origin/${UPGRADEBRANCH} && git rebase HEAD^
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Error: Failure while updating, will continue as is."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
else
|
||||
echo "UPGRADEURL is not specified in conf - No Upgrade option available."
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# At first, sync central configs if they are configured to be synced
|
||||
if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
|
||||
@@ -85,12 +93,13 @@ if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
|
||||
echo "System is in configure-mode and configuration repository was found and synced, but still not configuration was found"
|
||||
echo "checking file $(dirname "$0")/../config/setup_system.conf"
|
||||
echo ""
|
||||
echo "Please make a inital copy of config/setup_system.conf.dist to config/setup_system.conf and check all settings there."
|
||||
echo "Please make a copy of system_setup/config.dist/setup_system.conf.dist to config/setup_system.conf and check all settings there."
|
||||
echo "Then rerun the logon script to sync the file to your repository."
|
||||
echo "Press any key to continue" && read -n 1 -s -r && exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#Check if Repository is defined
|
||||
if [ "${CLIENT_SOFTWARE_DST}." == "." ]; then
|
||||
echo "No central softwarerepository defined (CLIENT_SOFTWARE_DST). Skipping sync."
|
||||
|
||||
Reference in New Issue
Block a user