b3f5426a856549ec57d0776a43f9688786835ee2
[ci-management.git] / vagrant / basebuild / bootstrap.sh
1 #!/bin/bash
2
3 # die on errors
4 set -e
5
6 # pull in bootstrap functions
7 . /vagrant/lib/bootstrap-functions.sh
8
9 echo "---> Attempting to detect OS"
10 # OS selector
11 if [ -f /usr/bin/yum ]
12 then
13     echo "---> RH type system detected"
14     rh_clean_pkgs
15     rh_update_pkgs
16     rh_install_pkgs
17
18 elif [ -f /usr/bin/apt-get ]
19 then
20     echo "---> Debian type system detected"
21     export DEBIAN_FRONTEND=noninteractive
22
23     deb_enable_serial_console
24     deb_aptconf_batchconf
25     deb_sync_minor
26     deb_correct_shell
27     deb_install_pkgs
28     deb_flush
29     deb_reup_certs
30
31     # It is not necessary to load uio module during bootstrap phase
32     # deb_probe_modules uio_pci_generic
33
34     # Make sure uio loads at boot time
35     deb_enable_modules 'uio_pci_generic'
36
37     deb_enable_hugepages
38
39     # It is not necessary to mount hugepages during bootstrap phase
40     # deb_mount_hugepages
41
42 fi
43
44 echo "bootstrap process (PID=$$) complete."
45
46 exit 0