Disable things which may lock /var/lib/dpkg/lock
[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_remove_pkgs
29     deb_disable_apt_systemd_daily
30     deb_flush
31     deb_reup_certs
32
33     # It is not necessary to load uio module during bootstrap phase
34     # deb_probe_modules uio_pci_generic
35
36     # Make sure uio loads at boot time
37     deb_enable_modules 'uio_pci_generic'
38
39     deb_enable_hugepages
40
41     # It is not necessary to mount hugepages during bootstrap phase
42     # deb_mount_hugepages
43
44 fi
45
46 echo "bootstrap process (PID=$$) complete."
47
48 exit 0