From b5462e47810831935ad778b5b4ff7e9677b6bfd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Tue, 5 May 2026 08:35:00 +0200 Subject: [PATCH 01/10] NC: remove autostart from installed Version --- .../0050_nextcloud_desktopclient/user_run.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client_software/0050_nextcloud_desktopclient/user_run.sh b/client_software/0050_nextcloud_desktopclient/user_run.sh index 61f886e..5dd6408 100755 --- a/client_software/0050_nextcloud_desktopclient/user_run.sh +++ b/client_software/0050_nextcloud_desktopclient/user_run.sh @@ -21,9 +21,14 @@ fi #Remove Nextcloud from autostart anyway! Must be started by this script manually, because if it was started befor the ecrypted mount, #it will never sync and always throw an error that the local dir is missing -if [ -f "$SUDO_HOME/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop" ]; then - echo "Remove Autostart Nextcloud" - rm $SUDO_HOME/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop +if [ -f "$HOME/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop" ]; then + echo "Remove Autostart Nextcloud (old)" + rm $HOME/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop +fi +# Same for NCs nuild-in autostart +if [ -f "$HOME/.config/autostart/Nextcloud.desktop" ]; then + echo "Remove Autostart Nextcloud (from installed binary)" + rm $HOME/.config/autostart/Nextcloud.desktop fi NC_PID=$( pgrep -u $USER nextcloud ) -- 2.52.0 From 6876c06eadece58f5acacc5228c868f8385f8ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Tue, 5 May 2026 08:50:21 +0200 Subject: [PATCH 02/10] nextcloud/user_run: centralise Flatpak app ID and data dir path Introduce NC_FLATPAK_APP and NC_FLATPAK_DIR variables so the app ID and ~/.var/app path are defined once and referenced everywhere, rather than repeated as literals. Also fixes a stray leading '/' in the nextcloud.cfg grep path. Co-Authored-By: Claude Sonnet 4.6 --- .../0050_nextcloud_desktopclient/user_run.sh | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/client_software/0050_nextcloud_desktopclient/user_run.sh b/client_software/0050_nextcloud_desktopclient/user_run.sh index 5dd6408..2c68fa0 100755 --- a/client_software/0050_nextcloud_desktopclient/user_run.sh +++ b/client_software/0050_nextcloud_desktopclient/user_run.sh @@ -10,7 +10,9 @@ echo "Setup Nextcloud- Sync" #Local Vars -BASECMD="/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud com.nextcloud.desktopclient.nextcloud" +NC_FLATPAK_APP="com.nextcloud.desktopclient.nextcloud" +NC_FLATPAK_DIR="${HOME}/.var/app/${NC_FLATPAK_APP}" +BASECMD="/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud ${NC_FLATPAK_APP}" #Check Token if [ "${DAVTOKEN_USER}." = "." ]; then @@ -21,9 +23,9 @@ fi #Remove Nextcloud from autostart anyway! Must be started by this script manually, because if it was started befor the ecrypted mount, #it will never sync and always throw an error that the local dir is missing -if [ -f "$HOME/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop" ]; then +if [ -f "$HOME/.config/autostart/${NC_FLATPAK_APP}.desktop" ]; then echo "Remove Autostart Nextcloud (old)" - rm $HOME/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop + rm $HOME/.config/autostart/${NC_FLATPAK_APP}.desktop fi # Same for NCs nuild-in autostart if [ -f "$HOME/.config/autostart/Nextcloud.desktop" ]; then @@ -34,7 +36,7 @@ fi NC_PID=$( pgrep -u $USER nextcloud ) if [ -n "${NC_PID}" ]; then echo "Stopping Nextcloud with PID ${NC_PID}" - /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud com.nextcloud.desktopclient.nextcloud --quit >/dev/null + /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud ${NC_FLATPAK_APP} --quit >/dev/null if [ $? -ne 0 ]; then echo "Service could not be stopped, please check why." exit 1 @@ -45,14 +47,14 @@ fi NC_PID=$( pgrep -u $USER nextcloud ) if [ -n "${NC_PID}" ]; then echo "Nextcloud still running with PID ${NC_PID}. Force stop" - # Kill does not remove lockfiles in ~/.var/app/com.nextcloud.desktopclient.nextcloud/cache/tmp/ which will prevent next start + # Kill does not remove lockfiles in ${NC_FLATPAK_DIR}/cache/tmp/ which will prevent next start kill ${NC_PID} if [ $? -ne 0 ]; then echo "Service could not be stopped, please check why." exit 1 fi sleep 0.5 - rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/cache/temp/* + rm -rif ${NC_FLATPAK_DIR}/cache/temp/* fi #Check if Option is Configured to use Nextcloud Desktop Data- Sync @@ -95,7 +97,7 @@ for CLIENT_DATA_DECLARE_LINE in "${CLIENT_DATA_SYNC[@]}"; do eval "${CLIENT_DATA_DECLARE_LINE}" # echo "DEBUG user_run.sh(0020)_2: ${CLIENT_DATA_SYNC_LINE[@]}" # Now, CLIENT_DATA_SYNC_LINE[0] contains the local path and CLIENT_DATA_SYNC_LINE[1] contains the remote path - if grep -q "localPath=${CLIENT_DATA_SYNC_LINE[0]}" "/${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud/nextcloud.cfg"; then + if grep -q "localPath=${CLIENT_DATA_SYNC_LINE[0]}" "${NC_FLATPAK_DIR}/config/Nextcloud/nextcloud.cfg"; then echo "Already found configured local folder ${CLIENT_DATA_SYNC_LINE[0]} syncing with ${CLIENT_DATA_SYNC_LINE[1]} . Leaving it unchanged." _nc_first=0 else @@ -116,8 +118,8 @@ for CLIENT_DATA_DECLARE_LINE in "${CLIENT_DATA_SYNC[@]}"; do echo "Exec: ${SYNCCMD_HIDDENPW}" if [ "${_nc_wipe_done}" -eq 0 ]; then # Autoprovisioning only works when no configuration is existent — wipe once before first new setup - rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/data/Nextcloud - rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud + rm -rif ${NC_FLATPAK_DIR}/data/Nextcloud + rm -rif ${NC_FLATPAK_DIR}/config/Nextcloud _nc_wipe_done=1 fi #Now, execute Nextcloud autoprovisionig -- 2.52.0 From c3c0a6ac85c1a809e7bdecf7c06b3a4ea5b7cbf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Tue, 5 May 2026 14:14:09 +0200 Subject: [PATCH 03/10] cinnamon_fullsetup: exclude akonadi and all dependent KDE PIM packages Anaconda's depsolve pulls in akonadi-server via kmymoney-libs (kmymoney is an optional package in @office). Exclude the entire akonadi chain so neither akonadi-server nor any package requiring it gets installed. Co-Authored-By: Claude Sonnet 4.6 --- ks_base_profiles/cinnamon_fullsetup.cfg | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/ks_base_profiles/cinnamon_fullsetup.cfg b/ks_base_profiles/cinnamon_fullsetup.cfg index f8d51b4..ad99318 100644 --- a/ks_base_profiles/cinnamon_fullsetup.cfg +++ b/ks_base_profiles/cinnamon_fullsetup.cfg @@ -68,6 +68,49 @@ android-tools -samba-client -samba-usershares -BackupPC +#Exclude akonadi and all packages requiring it (pulled in via @office optional: kmymoney) +-akonadi-server +-akonadi-server-mysql +-akonadi-calendar +-akonadi-calendar-tools +-akonadi-contacts +-akonadi-mime +-akonadi-search +-akonadi-import-wizard +-akonadiconsole +-kdepim-runtime +-kdepim-runtime-libs +-kdepim-addons +-kalarm +-kgpg +-kleopatra +-kmail +-kmail-libs +-kmail-account-wizard +-kaddressbook +-kaddressbook-libs +-korganizer +-korganizer-libs +-kontact +-akregator +-merkuro +-zanshin +-kjots +-knotes +-knotes-libs +-pimcommon +-calendarsupport +-eventviews +-incidenceeditor +-mailcommon +-mailimporter-akonadi +-mbox-importer +-pim-data-exporter +-pim-data-exporter-libs +-messagelib +-maui-mauikit-calendar +-kmymoney +-kmymoney-libs #Needed by SSSD oddjob-mkhomedir nss-pam-ldapd -- 2.52.0 From cf784b56a6f1aad176cb3de41764e5abf49cd47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Tue, 5 May 2026 14:18:03 +0200 Subject: [PATCH 04/10] kde_fullsetup: expand akonadi exclusions to full chain @kde-pim is optional and not selected, so all KDE PIM packages are safe to exclude. Replaces the previous partial -akonadi-server/mysql with the complete exclusion list matching cinnamon_fullsetup.cfg. Co-Authored-By: Claude Sonnet 4.6 --- ks_base_profiles/kde_fullsetup.cfg | 42 +++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/ks_base_profiles/kde_fullsetup.cfg b/ks_base_profiles/kde_fullsetup.cfg index ae45fb3..8dd5af5 100644 --- a/ks_base_profiles/kde_fullsetup.cfg +++ b/ks_base_profiles/kde_fullsetup.cfg @@ -68,9 +68,49 @@ android-tools -kmines #Annoying plasmoids -kdeplasma-addons -#Search - Powerful, but slow +#Exclude akonadi and all packages requiring it (@kde-pim is optional and not selected) -akonadi-server -akonadi-server-mysql +-akonadi-calendar +-akonadi-calendar-tools +-akonadi-contacts +-akonadi-mime +-akonadi-search +-akonadi-import-wizard +-akonadiconsole +-kdepim-runtime +-kdepim-runtime-libs +-kdepim-addons +-kalarm +-kgpg +-kleopatra +-kmail +-kmail-libs +-kmail-account-wizard +-kaddressbook +-kaddressbook-libs +-korganizer +-korganizer-libs +-kontact +-akregator +-merkuro +-zanshin +-kjots +-knotes +-knotes-libs +-pimcommon +-calendarsupport +-eventviews +-incidenceeditor +-mailcommon +-mailimporter-akonadi +-mbox-importer +-pim-data-exporter +-pim-data-exporter-libs +-messagelib +-maui-mauikit-calendar +-kmymoney +-kmymoney-libs -dragon -kdeconnectd -kde-connect -- 2.52.0 From 0dadf36230d5823acfcf8ef18e19bf4b7f885f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Tue, 5 May 2026 21:07:48 +0200 Subject: [PATCH 05/10] Baseprofilenames and configure checks for existing preconfigure --- ...p.cfg => fedora_44_cinnamon_fullsetup.cfg} | 0 ...lsetup.cfg => fedora_44_kde_fullsetup.cfg} | 0 system_setup/configure.sh | 28 ++++++++++++++++--- 3 files changed, 24 insertions(+), 4 deletions(-) rename ks_base_profiles/{cinnamon_fullsetup.cfg => fedora_44_cinnamon_fullsetup.cfg} (100%) rename ks_base_profiles/{kde_fullsetup.cfg => fedora_44_kde_fullsetup.cfg} (100%) diff --git a/ks_base_profiles/cinnamon_fullsetup.cfg b/ks_base_profiles/fedora_44_cinnamon_fullsetup.cfg similarity index 100% rename from ks_base_profiles/cinnamon_fullsetup.cfg rename to ks_base_profiles/fedora_44_cinnamon_fullsetup.cfg diff --git a/ks_base_profiles/kde_fullsetup.cfg b/ks_base_profiles/fedora_44_kde_fullsetup.cfg similarity index 100% rename from ks_base_profiles/kde_fullsetup.cfg rename to ks_base_profiles/fedora_44_kde_fullsetup.cfg diff --git a/system_setup/configure.sh b/system_setup/configure.sh index 9f36f03..70c20ee 100755 --- a/system_setup/configure.sh +++ b/system_setup/configure.sh @@ -39,8 +39,28 @@ override_conf_var() { } do_configure() { - mkdir -p "$(dirname "$CONF_FILE")" - cp "$CONF_DIST" "$CONF_FILE" # Either setup_system.conf or setup_system.conf.dist to config.d/configure.conf + if [[ -f "$CONF_FILE" ]]; then + echo "Existing preconfig found: $CONF_FILE" + while true; do + read -r -p " Do you want to use it (1) or start with a new config (2): " CHOICE + case "${CHOICE}" in + 1) + echo "Using the existing File" + break + ;; + 2) + rm "$CONF_FILE" + cp "${CONF_DIST}" "$CONF_FILE" + break + ;; + *) + echo " Please enter 1 or 2." + ;; + esac + done + else + cp "${CONF_DIST}" "$CONF_FILE" + fi echo "" echo "=== System Configuration ===" @@ -58,7 +78,7 @@ do_configure() { set_conf_var "REPO_BRANCH" "$REPO_BRANCH" fi - source "$( dirname "$0" )/setup_system.inc.sh" + source "$CONF_FILE" VARS=("TLDOMAIN" "SERVERFQDN_IPA" "DOMAIN" "SERVERFQDN_NC" "IPAVAULTUSE" "IPAVAULTNAME" "DISTCONFIGPATH_SRC" "CLIENTADMINGROUP" ) for ELE in "${VARS[@]}" do @@ -66,7 +86,7 @@ do_configure() { echo "" new_ELE=$(prompt_value "${ELE}" "${!ELE}") set_conf_var "${ELE}" "${new_ELE}" - source "$( dirname "$0" )/setup_system.inc.sh" + source "$CONF_FILE" REPEAT_TEST=1 case ${ELE} in "SERVERFQDN_NC") echo "=== Testing: Nextcloud server ===" -- 2.52.0 From 9fed049222425b9942933e19f8b78ee306cffb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Tue, 5 May 2026 21:33:25 +0200 Subject: [PATCH 06/10] configure: comment if existing config was found --- system_setup/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/system_setup/configure.sh b/system_setup/configure.sh index 70c20ee..d2d6ce1 100755 --- a/system_setup/configure.sh +++ b/system_setup/configure.sh @@ -9,6 +9,7 @@ CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf" CONF_EXISTING="${SCRIPTDIR}/../config/setup_system.conf" if [[ -f "$CONF_EXISTING" ]]; then + echo "Found existing config in $CONF_EXISTING . Will try to use it." CONF_DIST="$CONF_EXISTING" else CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist" -- 2.52.0 From bc4c50218fa16b2041573a40c97072ce2b2a46de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Tue, 5 May 2026 21:53:12 +0200 Subject: [PATCH 07/10] kde: exclude kde spin initial setup, so that akanadi can be skipped --- ks_base_profiles/fedora_44_kde_fullsetup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ks_base_profiles/fedora_44_kde_fullsetup.cfg b/ks_base_profiles/fedora_44_kde_fullsetup.cfg index 8dd5af5..9d28f75 100644 --- a/ks_base_profiles/fedora_44_kde_fullsetup.cfg +++ b/ks_base_profiles/fedora_44_kde_fullsetup.cfg @@ -27,7 +27,6 @@ mount -L OEMDRV /mnt/anaconda_pre @domain-client @system-tools @kde-media -@kde-spin-initial-setup @libreoffice @office @sound-and-video @@ -69,6 +68,7 @@ android-tools #Annoying plasmoids -kdeplasma-addons #Exclude akonadi and all packages requiring it (@kde-pim is optional and not selected) +# @kde-spin-initial-setup -akonadi-server -akonadi-server-mysql -akonadi-calendar -- 2.52.0 From 559e913c0f7cc1ef95119a04b678ca8c9b5b99ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Wed, 6 May 2026 08:07:31 +0200 Subject: [PATCH 08/10] install: if config was found with other repourl as the user specified, use users repourl for configure call --- system_setup/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system_setup/install.sh b/system_setup/install.sh index 522e050..c201a3b 100755 --- a/system_setup/install.sh +++ b/system_setup/install.sh @@ -408,7 +408,13 @@ if [[ -n "$EXISTING_OEMDRV_DEV" ]]; then || die "git fetch failed." git -C "$MOUNT_POINT" checkout -B "$REPO_BRANCH" FETCH_HEAD \ || die "git checkout failed." + #Backup Repovalues if the config was read from existing config with production values and we configured + #devel values above + BACK_REPO_URL="$REPO_URL" + BACK_REPO_BRANCH="$REPO_BRANCH" source "$MOUNT_POINT/system_setup/setup_system.inc.sh" --missingconfok + export REPO_URL="$EXIST_URL" + export REPO_BRANCH="$BACK_REPO_BRANCH" finish_install "$EXISTING_OEMDRV_DEV" exit 0 fi -- 2.52.0 From ab7dc208ad4e8b17dbf95b9fa99b84ae6bb98d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Wed, 6 May 2026 08:42:53 +0200 Subject: [PATCH 09/10] configure: Better detection and choice between predefined configs --- system_setup/configure.sh | 78 +++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/system_setup/configure.sh b/system_setup/configure.sh index d2d6ce1..030a94e 100755 --- a/system_setup/configure.sh +++ b/system_setup/configure.sh @@ -5,15 +5,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)" -CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf" - -CONF_EXISTING="${SCRIPTDIR}/../config/setup_system.conf" -if [[ -f "$CONF_EXISTING" ]]; then - echo "Found existing config in $CONF_EXISTING . Will try to use it." - CONF_DIST="$CONF_EXISTING" -else - CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist" -fi +CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist" +CONF_FILE="${SCRIPTDIR}/../config/setup_system.conf" +CONF_PRE="${SCRIPTDIR}/../config.d/configure.conf" # Prompt for a single value; returns the old value unchanged if the user presses Enter. prompt_value() { @@ -26,38 +20,66 @@ prompt_value() { # Replace the first matching simple export line in configure.conf. set_conf_var() { local varname="$1" value="$2" - sed -i "s|^[[:space:]]*export ${varname}=.*|export ${varname}=\"${value}\"|" "$CONF_FILE" + sed -i "s|^[[:space:]]*export ${varname}=.*|export ${varname}=\"${value}\"|" "$CONF_PRE" } # Update an existing bare "export VAR=…" line at the top level, or append one. override_conf_var() { local varname="$1" value="$2" - if grep -q "^export ${varname}=" "$CONF_FILE"; then - sed -i "s|^export ${varname}=.*|export ${varname}=\"${value}\"|" "$CONF_FILE" + if grep -q "^export ${varname}=" "$CONF_PRE"; then + sed -i "s|^export ${varname}=.*|export ${varname}=\"${value}\"|" "$CONF_PRE" else - printf 'export %s="%s"\n' "$varname" "$value" >> "$CONF_FILE" + printf 'export %s="%s"\n' "$varname" "$value" >> "$CONF_PRE" fi } do_configure() { - if [[ -f "$CONF_FILE" ]]; then - echo "Existing preconfig found: $CONF_FILE" + # Possibilities: + # 1 Found CONF_FILE="${SCRIPTDIR}/../config/setup_system.conf": This is a preinstalled company-value filled complete conf file + # 2 Found CONF_PRE="${SCRIPTDIR}/../config.d/configure.conf": This a a configure file from a previous configure run + # 3 Found none of these: use CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist" + # -> if 1 or 2 found, ask the user if to use one of them + # -> either choice, the CONF_PRE="${SCRIPTDIR}/../config.d/configure.conf" is written from it and used for further setup + + if [ -f "$CONF_FILE" ] || [ -f "$CONF_PRE" ]; then + echo "Some alternatives found for configure source:" + if [[ -f "$CONF_PRE" ]]; then + echo " Choice (p): Another config run result was found in $CONF_PRE ." + echo " Hint: May contain Values that already were setup different for your details" + else + unset CONF_PRE + fi + if [[ -f "$CONF_FILE" ]]; then + echo " Choice (c): Found companys full config in $CONF_FILE ." + echo " This may be a full config, that is valid for your company." + else + unset CONF_FILE + fi + # Always possible: Use new dist + echo " Choice (d): You may discard all, and use distributed defaults from the maintainers." + echo " Hint: Will always start from scratch which guaranties to have a valid config for your current version" + while true; do - read -r -p " Do you want to use it (1) or start with a new config (2): " CHOICE + read -r -p " Please make a coice: " CHOICE case "${CHOICE}" in - 1) - echo "Using the existing File" - break + "p") + if [[ -f "$CONF_PRE" ]]; then + echo "Using the existing config run file." + break + fi ;; - 2) - rm "$CONF_FILE" - cp "${CONF_DIST}" "$CONF_FILE" - break + "c") + if [[ -f "$CONF_FILE" ]]; then + rm "$CONF_PRE" >/dev/null 2>&1 + cp "$CONF_FILE" "$CONF_PRE" && break + fi ;; - *) - echo " Please enter 1 or 2." + "d") + rm "$CONF_PRE" >/dev/null 2>&1 + cp "$CONF_DIST" "$CONF_PRE" && break ;; esac + echo "Invalid choice or error in selection made." done else cp "${CONF_DIST}" "$CONF_FILE" @@ -79,7 +101,7 @@ do_configure() { set_conf_var "REPO_BRANCH" "$REPO_BRANCH" fi - source "$CONF_FILE" + source "$CONF_PRE" VARS=("TLDOMAIN" "SERVERFQDN_IPA" "DOMAIN" "SERVERFQDN_NC" "IPAVAULTUSE" "IPAVAULTNAME" "DISTCONFIGPATH_SRC" "CLIENTADMINGROUP" ) for ELE in "${VARS[@]}" do @@ -87,7 +109,7 @@ do_configure() { echo "" new_ELE=$(prompt_value "${ELE}" "${!ELE}") set_conf_var "${ELE}" "${new_ELE}" - source "$CONF_FILE" + source "$CONF_PRE" REPEAT_TEST=1 case ${ELE} in "SERVERFQDN_NC") echo "=== Testing: Nextcloud server ===" @@ -159,7 +181,7 @@ do_configure() { done echo "" - echo "Configuration written to: ${CONF_FILE}" + echo "Configuration written to: ${CONF_PRE}" } while true; do -- 2.52.0 From b9787712066c820db82769db9ed3005e427a309d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Wed, 6 May 2026 09:06:30 +0200 Subject: [PATCH 10/10] confige: source dists defaults to for robustnes and docs --- install.md | 23 ++++++++++++++++++----- system_setup/configure.sh | 10 ++++++++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/install.md b/install.md index a3910fa..4ff511c 100644 --- a/install.md +++ b/install.md @@ -37,24 +37,37 @@ curl -fsSL ${REPO_URL%.git}/raw/branch/${REPO_BRANCH:-main}/system_setup/install sudo -E bash /tmp/install.sh ``` -Both are optional. That way, install.sh should know what to pull. +Both are export parameters are optional. That way, install.sh should know what to pull and use it for your new setup. ## After the script completes -Configure your environment before running any installation: +At the end of the installation, you will be asked wheter to run configure.sh . You are encouraged to do this always. + +But bevor letting `configure.sh` start, there are some options for making your life easier: + +1. You can either get some `setup_system.conf` file from your system admin and put it to `/opt/sys_config/config` . That way all your settings will be prefilled the right way. + +2. You may also use some preconfigured file from `config.d/configure.conf(.bak)` and put it to `config.d/configure.conf` - if thats existing from the first setup of this pc. +Pleas mind, that in the meantime your config may have changed dramatically, so this may be only a good choice if your last configure was not that long ago. + +3. You may also configure your environment before manually: ```sh cp /opt/sys_config/system_setup/config.dist/setup_system.conf.dist /opt/sys_config/config/setup_system.conf -# Edit setup_system.conf — set TLDOMAIN, SERVERFQDN_IPA, SERVERFQDN_NC, and paths. +# Edit setup_system.conf — set TLDOMAIN, SERVERFQDN_IPA, SERVERFQDN_NC, paths and all you need ``` -Optionally add local per-machine overrides in `config.d/`: +Mind, that this would be the job of `configure.sh` + +4. Optionally add additional local per-machine overrides in `config.d/`: ```sh -# Example: use the devel branch on this machine +# Example: always use the devel branch on this machine, no matter what was specified anywhere echo 'export REPO_BRANCH="devel"' > /opt/sys_config/config.d/system_defines.conf ``` +5. Otherwise, let `configure.sh` do it's job. + Once configured, boot the Fedora installer from USB — Anaconda will detect the `OEMDRV` partition and run the Kickstart automatically. ## Supported filesystems for shrinking diff --git a/system_setup/configure.sh b/system_setup/configure.sh index 030a94e..800745b 100755 --- a/system_setup/configure.sh +++ b/system_setup/configure.sh @@ -82,7 +82,7 @@ do_configure() { echo "Invalid choice or error in selection made." done else - cp "${CONF_DIST}" "$CONF_FILE" + cp "${CONF_DIST}" "$CONF_PRE" fi echo "" @@ -101,6 +101,11 @@ do_configure() { set_conf_var "REPO_BRANCH" "$REPO_BRANCH" fi + # Now there should all starting values be defined in $CONF_PRE file. + # We will additionally first read the dists defaults again to make sure, that all relevant settings that may be new to existing configs are predefined + # Could be no good idea when sysadmins are only deleting lines instead of unsettings its value, but makes sure there is not missing something for setup + source "$CONF_DIST" + #Now, read the users setting source "$CONF_PRE" VARS=("TLDOMAIN" "SERVERFQDN_IPA" "DOMAIN" "SERVERFQDN_NC" "IPAVAULTUSE" "IPAVAULTNAME" "DISTCONFIGPATH_SRC" "CLIENTADMINGROUP" ) for ELE in "${VARS[@]}" @@ -173,7 +178,8 @@ do_configure() { fi fi ;; - *) REPEAT_TEST=0 + *) echo "Not tests available." + REPEAT_TEST=0 ;; esac [[ $REPEAT_TEST == 0 ]] && break -- 2.52.0