diff options
author | Joachim Tingvold <joachim@tingvold.com> | 2015-03-21 18:40:28 +0100 |
---|---|---|
committer | Joachim Tingvold <joachim@tingvold.com> | 2015-03-21 18:40:28 +0100 |
commit | d5c0e6ac02bd4bb1832434ef3fa502a21ac48432 (patch) | |
tree | 9f754351c81d4ee1ffd1526823842b52bbd0f054 /bootstrap/install-dependencies.sh | |
parent | 6bf0be13c4ac46f612251eb13cf2b23f94441cc5 (diff) |
Bootstrap-related files get it's own directory
Diffstat (limited to 'bootstrap/install-dependencies.sh')
-rwxr-xr-x | bootstrap/install-dependencies.sh | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/bootstrap/install-dependencies.sh b/bootstrap/install-dependencies.sh new file mode 100755 index 0000000..4edb01f --- /dev/null +++ b/bootstrap/install-dependencies.sh @@ -0,0 +1,55 @@ +#!/bin/bash -e + +if [ "$1" != "master" -a "$1" != "slave" -a "$1" != "boot" ]; then + echo "Run as $0 <boot|master|slave>" + exit +fi + +# OK, we know the content of $0 is OK. I prefer sane names. +ROLE=$1; + +# Start by installing common packages. Remember to update +# this when a new common dependency is discovered, plx. +apt-get -y install \ + vim-nox \ + git \ + ntp \ + screen \ + tmux \ + dnsutils \ + build-essential \ + libnet-ip-perl \ + libnetaddr-ip-perl \ + libnet-telnet-cisco-perl \ + libnet-ping-external-perl \ + perl-modules \ + libdbi-perl \ + libdbd-pg-perl \ + libnet-telnet-perl + +if [ "${ROLE}" == "boot" ]; then + # Install-tasks specific for the _bootstrab box_ here + echo "Installing for bootstrap" + apt-get -y install \ + bind9utils +fi + +if [ "${ROLE}" == "master" ]; then + # Install-tasks specific for the _primary_ here + echo "Installing for primary/master" + apt-get -y install \ + isc-dhcp-server \ + bind9utils \ + bind9 +fi + +if [ "${ROLE}" == "slave" ]; then + # Install-tasks specific for the _secondary_ here + echo "Installing for secondary/slave" + apt-get -y install \ + isc-dhcp-server \ + bind9utils \ + bind9 +fi + +echo "Dependency installation for ${ROLE} complete." |