Files
Daniel unbrot Pätzold 9264ca8e92 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>
2026-05-03 13:28:44 +02:00

36 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env sh
# Replaces /etc/skel with the contents of skel.tar.zst
source $(dirname "$0")/setup_system.inc.sh
EXECDIR=$(pwd)
SRCFILE="${SYSCONFIGPATH}/config/skel.tar.zst"
SRCFILEDIST="$(dirname "$0")/skel/skel.tar.zst.dist"
#Check for root
if [ "$EUID" -ne 0 ]; then
echo "Error: Script requires root privileges."
exit 1
fi
#Check for existing File - if not there, make a copy of the dist-file
if [[ ! -f "${SRCFILE}" ]]; then
echo "No SKEL file was found. Using distributed skel in ${SRCFILEDIST}"
cp "${SRCFILEDIST}" "${SRCFILE}"
if [[ $? -ne 0 ]]; then
echo "Something went wrong, please check Output"
echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi
fi
cd /etc
sudo rm -f -r /etc/skel
sudo tar -xf ${SRCFILE}
if [ $? -eq 0 ]; then
echo "Sucessfully wrote skel."
sudo chown -R root:root /etc/skel
sudo setfacl -R -m u::rwX,g::rX,o::rX /etc/skel
else
echo "Something went wrong, please check Output"
echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi
cd ${EXECDIR}