Fixed error with updates on internal disk installations.

This commit is contained in:
Storm Dragon
2025-10-13 13:43:09 -04:00
parent 205f50affa
commit e0dcd2b229
+7 -7
View File
@@ -20,14 +20,14 @@ errorCount=0
errorMessages=() errorMessages=()
# Clean up old packages keeping currently installed versions only # Clean up old packages keeping currently installed versions only
pacman -Sc --noconfirm 2>&1 | tee -a "${logFile}" pacman -Sc --noconfirm --quiet 2>&1 | tee -a "${logFile}"
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
((errorCount++)) ((errorCount++))
errorMessages+=("Package cleaning failed") errorMessages+=("Package cleaning failed")
fi fi
# Upgrade the system # Upgrade the system
pacman -Syu --noconfirm 2>&1 | tee -a "${logFile}" pacman -Syu --noconfirm --quiet 2>&1 | tee -a "${logFile}"
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
((errorCount++)) ((errorCount++))
errorMessages+=("Package update failed") errorMessages+=("Package update failed")
@@ -37,13 +37,13 @@ gitUrl="https://git.stormux.org/storm/gaming-image-files"
gitPath="${gitUrl##*/}" gitPath="${gitUrl##*/}"
pushd /tmp || exit pushd /tmp || exit
git config --global credential.helper store git config --global credential.helper store
git clone "${gitUrl}" 2>&1 | tee -a "${logFile}" git clone --quiet "${gitUrl}" 2>&1 | tee -a "${logFile}"
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
((errorCount++)) ((errorCount++))
errorMessages+=("Git clone failed") errorMessages+=("Git clone failed")
fi fi
pushd "${gitPath}" || exit pushd "${gitPath}" || exit
git checkout master 2>&1 | tee -a "${logFile}" git checkout --quiet master 2>&1 | tee -a "${logFile}"
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
((errorCount++)) ((errorCount++))
errorMessages+=("Git checkout master failed") errorMessages+=("Git checkout master failed")
@@ -65,13 +65,13 @@ for ignore in "${ignoreFiles[@]}"; do
fi fi
done done
# Copy all files as root (preserves permissions properly) # Copy all files as root (preserves permissions properly)
find . "${findArgs[@]}" -type f -exec bash -c 'for i ; do cp -av --preserve=all --parents "${i}" /;done' _ "{}" \; 2>&1 | tee -a "${logFile}" find . "${findArgs[@]}" -type f -exec bash -c 'for i ; do cp -a --preserve=all --parents "${i}" /;done' _ "{}" \; 2>&1 | tee -a "${logFile}"
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
((errorCount++)) ((errorCount++))
errorMessages+=("File copy failed") errorMessages+=("File copy failed")
fi fi
# Fix ownership of home directory files # Fix ownership of home directory files (exclude immutable .baremetal)
chown -R stormux:users /home/stormux 2>&1 | tee -a "${logFile}" find /home/stormux -path /home/stormux/.baremetal -prune -o -exec chown -h stormux:users '{}' \; 2>&1 | tee -a "${logFile}"
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
((errorCount++)) ((errorCount++))
errorMessages+=("Ownership fix failed") errorMessages+=("Ownership fix failed")