From 9b6c9fe423640a97933a2d07d0f99e0f0ed0081e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=C3=A4tzold?= Date: Tue, 10 Mar 2026 09:59:14 +0100 Subject: [PATCH] Replaced conf by anonymous dist file --- .gitignore | 2 ++ README.md | 14 ++++++++++---- ...{setup_system.conf => setup_system.conf.dist} | 16 ++++++++-------- system_setup/setup_system.inc.sh | 4 ++++ system_setup/sync_client_software.sh | 7 ++----- 5 files changed, 26 insertions(+), 17 deletions(-) rename system_setup/{setup_system.conf => setup_system.conf.dist} (91%) diff --git a/.gitignore b/.gitignore index 0b85216..f226512 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +# system_setup/setup_system.conf +system_setup/setup_system.conf.bak system_setup/skel.tar.zst *.kdev4 .kdev4/* diff --git a/README.md b/README.md index b0a77b3..a478007 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,22 @@ # Fedora OEMDRV -an automated massinstallation scripting collection for Anakonda +an automated massinstallation scripting collection for Fedora and Anakonda IN DEVELOPMENT ! +This Software is very Specific, it needs at least: +- A Free IPA Server with IP Clients enrolled to the Domain +- A Nextcloud instance, connected to the Domain +- A client pc that will use this software to automate install and setup the PC + ## Install 1. Create Partition named "OEMDRV", at least 1 GByte in size on a local disk that will be readable when starting installation from stick 2. Format it BTRFS and mount it to "/sys_config" 3. Copy git files in it - 1. or for developement "/sys_config> git clone --progress -- https://gitea.dtext.online/obel1x/fedora-OEMDRV.git /sys_config" + 1. or for developement "/sys_config> git clone --progress -- https://gitea.dtext.online/obel1x/fedora-OEMDRV.git /sys_config" (maybe currently not possible, as this is a private Repo) + Setup -- Check the settings in /sys_config/system_setup/setup_system.conf - +- Make a copy of setup_system.conf.dist, name it setup_system.conf +- Check the settings in it and change to your needs before running diff --git a/system_setup/setup_system.conf b/system_setup/setup_system.conf.dist similarity index 91% rename from system_setup/setup_system.conf rename to system_setup/setup_system.conf.dist index 29b825c..fe42a83 100644 --- a/system_setup/setup_system.conf +++ b/system_setup/setup_system.conf.dist @@ -2,12 +2,12 @@ # SPDX-FileCopyrightText: Daniel Pätzold # SPDX-License-Identifier: AGPL-3.0-or-later # -export TLDOMAIN=obel1x.de +export TLDOMAIN=domain.tld export DOMAIN=clients.${TLDOMAIN} export SERVERFQDN_IPA=ipa.${TLDOMAIN} # Needs to be the IPA- Server export SERVERFQDN_NC=nextcloud.${TLDOMAIN} export SYSCONFIGPATH="/sys_config" -export INSTALLDOCS="https://dokuwiki.obel1x.de/content:serverbasics" +export INSTALLDOCS="https://gitea.dtext.online/obel1x/fedora-OEMDRV/src/branch/main/README.md" export CLIENTADMINGROUP="clientadmins" # Method to determine Unique Hostname / FQDN of the Client. May be replaced by your needs @@ -18,18 +18,14 @@ else fi export FQDN=${HOSTNM}.${DOMAIN} -#Additional Client-Software- Repository-Folder (Shared Folder / Systemwide) +#Additional Client-Software- Repository-Folder in Nextcloud (Shared Folder / Systemwide) export CLIENT_SOFTWARE_DST="/opt/client_software" # Optional. If you don't have a Folder that should always be synced, leave this empty export CLIENT_SOFTWARE_SRC="/Shared/sw_geteilt/client_software" -#First run Service Name -export FIRSTRUN_SERVICENAME="setup-system.service" -export FIRSTRUN_SCRIPTPATH="/usr/lib/systemd/system" - #Secure File Encryption #Needs a running KRA- Service on FreeIPA # Set to "true" to use Encryption via IPAVAULT - OTHERWISE YOUR FILES WILL NOT BE ENCRYPTED -export IPAVAULTUSE="false" +export IPAVAULTUSE="true" # Vaultname - can be any Name export IPAVAULTNAME="CLIENT_FILEENCRYPTION_"${HOSTNM} @@ -67,6 +63,10 @@ if [ ${SCRIPTPATH::2} == "//" ]; then fi export SCRIPTNAME=$(basename "$0") +#First run Service Name +export FIRSTRUN_SERVICENAME="setup-system.service" +export FIRSTRUN_SCRIPTPATH="/usr/lib/systemd/system" + # temp and log files TEMPDIR="${HOME}/temp/system_setup" LOGFILE="${TEMPDIR}/${SCRIPTNAME}.log" diff --git a/system_setup/setup_system.inc.sh b/system_setup/setup_system.inc.sh index eb27df8..d9498a2 100644 --- a/system_setup/setup_system.inc.sh +++ b/system_setup/setup_system.inc.sh @@ -14,6 +14,10 @@ # fi # return 0 #} +if [ ! -f $(pwd)/setup_system.conf ]; then + echo "System configuration not found. Please make a copy of setup_system.conf.dist, name it setup_system.conf and check the settings in it before running." + exit 1 +fi source $(pwd)/setup_system.conf #Check if the Data- Directory is encrypted diff --git a/system_setup/sync_client_software.sh b/system_setup/sync_client_software.sh index 7b6fe20..d2fa91c 100755 --- a/system_setup/sync_client_software.sh +++ b/system_setup/sync_client_software.sh @@ -28,9 +28,8 @@ fi echo "Syncing central softwarerepository ${CLIENT_SOFTWARE_DST}" # Create Directory if not existent -if [ ! -d ${CLIENT_SOFTWARE_DST} ]; then - mkdir ${CLIENT_SOFTWARE_DST} -fi +mkdir -p ${CLIENT_SOFTWARE_DST} +mkdir -p ${CLIENT_SOFTWARE_DST}/source #Logs for systems software-repository go to roots log files LOGFILE="${TEMPDIR}/${SCRIPTNAME}.log" @@ -44,8 +43,6 @@ echo "Update or install Nextcloud client" #Sync Files SYNCCMD="sudo -i /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloudcmd com.nextcloud.desktopclient.nextcloud -h -u ${DAVTOKEN_USER} -p ${DAVTOKEN_PASS} --path ${CLIENT_SOFTWARE_SRC} ${CLIENT_SOFTWARE_DST}/source https://${SERVERFQDN_NC}" SYNCCMD_HIDDENPW=$( echo "${SYNCCMD/${DAVTOKEN_PASS}/***HIDDEN***}" ) -mkdir -p ${CLIENT_SOFTWARE_SRC} -mkdir -p ${CLIENT_SOFTWARE_SRC}/source chown root:${CLIENTADMINGROUP} -R ${CLIENT_SOFTWARE_DST} chmod ug+rw,o-rwx -R ${CLIENT_SOFTWARE_DST} echo "Exec: ${SYNCCMD_HIDDENPW}"