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() {