Skip to content

Commit

Permalink
Avoid removing systemd in WIA
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcr01 committed Jan 22, 2024
1 parent 8c85381 commit 7a7d90a
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions unattended_installer/install_functions/installCommon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -812,14 +812,16 @@ function installCommon_yumRemoveWIADependencies(){
if [ "${#wia_dependencies_installed[@]}" -gt 0 ]; then
common_logger "--- Dependencies ---"
for dep in "${wia_dependencies_installed[@]}"; do
common_logger "Removing $dep."
yum_output=$(yum remove ${dep} -y 2>&1)
yum_code="${PIPESTATUS[0]}"

eval "echo \${yum_output} ${debug}"
if [ "${yum_code}" != 0 ]; then
common_logger -e "Cannot remove dependency: ${dep}."
exit 1
if [ "${dep}" != "systemd" ]; then
common_logger "Removing $dep."
yum_output=$(yum remove ${dep} -y 2>&1)
yum_code="${PIPESTATUS[0]}"

eval "echo \${yum_output} ${debug}"
if [ "${yum_code}" != 0 ]; then
common_logger -e "Cannot remove dependency: ${dep}."
exit 1
fi
fi
done
fi
Expand All @@ -831,14 +833,16 @@ function installCommon_aptRemoveWIADependencies(){
if [ "${#wia_dependencies_installed[@]}" -gt 0 ]; then
common_logger "--- Dependencies ----"
for dep in "${wia_dependencies_installed[@]}"; do
common_logger "Removing $dep."
apt_output=$(apt-get remove --purge ${dep} -y 2>&1)
apt_code="${PIPESTATUS[0]}"

eval "echo \${apt_output} ${debug}"
if [ "${apt_code}" != 0 ]; then
common_logger -e "Cannot remove dependency: ${dep}."
exit 1
if [ "${dep}" != "systemd" ]; then
common_logger "Removing $dep."
apt_output=$(apt-get remove --purge ${dep} -y 2>&1)
apt_code="${PIPESTATUS[0]}"

eval "echo \${apt_output} ${debug}"
if [ "${apt_code}" != 0 ]; then
common_logger -e "Cannot remove dependency: ${dep}."
exit 1
fi
fi
done
fi
Expand Down

0 comments on commit 7a7d90a

Please sign in to comment.