blob: 87eb3860afc744b1f1b32d8ecd2c6e31a856a6ca (
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
|
#!/bin/bash
# die on errors
set -e
# pull in bootstrap functions
. /vagrant/lib/bootstrap-functions.sh
do_setup
do_mvn_install
# record the bootstrap.sh checksum
sha1sum $0 > /etc/bootstrap.sha
sha1sum /vagrant/lib/bootstrap-functions.sh > /etc/bootstrap-functions.sha
echo "---> Attempting to detect OS"
# OS selector
if [ -f /usr/bin/yum ]
then
echo "---> RH type system detected"
rh_clean_pkgs
rh_update_pkgs
rh_install_pkgs
elif [ -f /usr/bin/apt-get ]
then
echo "---> Debian type system detected"
export DEBIAN_FRONTEND=noninteractive
deb_aptconf_batchconf
deb_sync_minor
deb_correct_shell
deb_install_pkgs
deb_remove_pkgs
deb_disable_apt_systemd_daily
deb_flush
deb_reup_certs
# It is not necessary to load uio module during bootstrap phase
# deb_probe_modules uio_pci_generic
# Make sure uio loads at boot time
deb_enable_modules 'uio_pci_generic'
deb_enable_hugepages
# It is not necessary to mount hugepages during bootstrap phase
# deb_mount_hugepages
fi
do_cleanup
echo "bootstrap process (PID=$$) complete."
exit 0
|