From 232dfeeaf0cc8375a69abacd6109673ffaa6dcd6 Mon Sep 17 00:00:00 2001 From: dniwdeus Date: Mon, 7 Mar 2016 23:09:17 +0100 Subject: [PATCH] add arch support to installer --- bin/dsh | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/bin/dsh b/bin/dsh index 65bf3d1..b61577e 100755 --- a/bin/dsh +++ b/bin/dsh @@ -594,7 +594,15 @@ install_prerequisites () bash <(echo "$presetup_script") read -p "Press any key when the installation in another console window is done..." elif is_linux ; then - install_ubuntu + if lsb_release -a | grep -q Manjaro; then + #install arch for arch-systems + install_arch + + else # Ubuntu + install_ubuntu + + fi + else # mac local presetup_script=$(curl -fsS https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/$B2D_BRANCH/scripts/presetup-mac.sh) if_failed "Could not get 'presetup-mac.sh'. Please check your internet connection" @@ -665,6 +673,67 @@ EOF echo-green "To run docker without sudo log out and back in or run 'newgrp docker' now." } +# Install Docker and setup Drude on Arch +install_arch () +{ + #if [ -r /etc/lsb-release ]; then + # lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")" + # lsb_release="$(. /etc/lsb-release && echo "$DISTRIB_RELEASE")" + #fi + + #if [[ $lsb_dist != 'Ubuntu' || $(_get_version_str $lsb_release) < $(_get_version_str '14.04') ]]; then + # echo-red "Sorry, this script only supports Ubuntu 14.04+" + # exit 1 + #fi + + echo-green "Installing Docker..." + sudo pacman -S docker --noconfirm && \ + sudo systemctl start docker && \ + sudo docker version + if_failed "Docker installation/upgrade failed." + + echo-green "Installing Docker Compose..." + sudo pacman -S docker-compose && \ + docker-compose --version + if_failed "Docker Compose installation/upgrade failed." + + echo-green "Adding a subnet for Drude..." + ip_mask="192.168.10.1/24" + # Make sure we don't do this twice + if ! grep -q $ip_mask /etc/systemd/network/interfaces; then + cat > /tmp/drude.ip.addr <