blob: c10224f2e5c21d583b743d952c9d05598a3f68f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#!/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;
# Resynchronize the package index before install
apt-get -y update
# 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 \
libnetaddr-ip-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."
|