From 155a2cb7199433dc3b1b7112ee87451959247ce5 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 10 Feb 2017 11:09:53 +0200 Subject: [PATCH] Add support for stable installation on Alpine Linux release 3.5 --- README.rst | 1 + bootstrap-salt.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 0f1a334..36ce1f6 100644 --- a/README.rst +++ b/README.rst @@ -275,6 +275,7 @@ for Ubuntu 16.04 from `SaltStack's Ubuntu repository`_ and install the 16.04 pac Other Linux distro ~~~~~~~~~~~~~~~~~~ +- Alpine Linux 3.5/edge - Arch Linux - Gentoo diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f252dae..8f3ff46 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4194,13 +4194,13 @@ install_cloud_linux_check_services() { # Alpine Linux Install Functions # install_alpine_linux_stable_deps() { - __COMUNITY_REPO_ENABLED="$(grep '^https://dl-cdn.alpinelinux.org/alpine/edge/community$' /etc/apk/repositories)" - if [ "${__COMUNITY_REPO_ENABLED}" != "" ]; then - apk update - else - echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories - apk update + if ! grep -q '^[^#].\+alpine/.\+/community' /etc/apk/repositories; then + # Add community repository entry based on the "main" repo URL + __REPO=$(grep '^[^#].\+alpine/.\+/main\>' /etc/apk/repositories) + echo "${__REPO}" | sed -e 's/main/community/' >> /etc/apk/repositories fi + + apk update } install_alpine_linux_git_deps() {