Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cicharka committed Jan 19, 2022
1 parent 2badf6f commit 76d917e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ echol "Docker platform: $docker_platform"

enable_system_repos_script="/var/tmp/epi-repository-setup-scripts/enable-system-repos.sh"
disable_epirepo_client_script="/var/tmp/epi-repository-setup-scripts/disable-epirepo-client.sh"
apt_sources_list="/etc/apt/sources.list"

if [[ ! -f /etc/apt/sources.list ]]; then
if [[ ! -f $apt_sources_list || ! -s $apt_sources_list ]]; then
if [[ -f /var/tmp/enabled-system-repos.tar && -f $enable_system_repos_script ]]; then
echol "OS repositories seems missing, restoring..."
$enable_system_repos_script || exit_with_error "Could not restore system repositories"
$disable_epirepo_client_script || exit_with_error "Could not disable epirepo"
else
echol "/etc/apt/sources.list seems missing, you either know what you're doing or you need to fix your repositories"
echol "$apt_sources_list seems missing or is empty, you either know what you're doing or you need to fix your repositories"
fi
fi

check_connection apt '/etc/apt/sources.list'
check_connection apt $apt_sources_list

# install prerequisites which might be missing
prerequisites=(wget gpg curl tar)
Expand Down

0 comments on commit 76d917e

Please sign in to comment.