Fixed error with updates on internal disk installations.
This commit is contained in:
@@ -20,14 +20,14 @@ errorCount=0
|
||||
errorMessages=()
|
||||
|
||||
# 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
|
||||
((errorCount++))
|
||||
errorMessages+=("Package cleaning failed")
|
||||
fi
|
||||
|
||||
# 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
|
||||
((errorCount++))
|
||||
errorMessages+=("Package update failed")
|
||||
@@ -37,13 +37,13 @@ gitUrl="https://git.stormux.org/storm/gaming-image-files"
|
||||
gitPath="${gitUrl##*/}"
|
||||
pushd /tmp || exit
|
||||
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
|
||||
((errorCount++))
|
||||
errorMessages+=("Git clone failed")
|
||||
fi
|
||||
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
|
||||
((errorCount++))
|
||||
errorMessages+=("Git checkout master failed")
|
||||
@@ -65,13 +65,13 @@ for ignore in "${ignoreFiles[@]}"; do
|
||||
fi
|
||||
done
|
||||
# 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
|
||||
((errorCount++))
|
||||
errorMessages+=("File copy failed")
|
||||
fi
|
||||
# Fix ownership of home directory files
|
||||
chown -R stormux:users /home/stormux 2>&1 | tee -a "${logFile}"
|
||||
# Fix ownership of home directory files (exclude immutable .baremetal)
|
||||
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
|
||||
((errorCount++))
|
||||
errorMessages+=("Ownership fix failed")
|
||||
|
||||
Reference in New Issue
Block a user