vagrant-lxc-base-boxes/gentoo/install-packages.sh

42 lines
792 B
Bash
Raw Normal View History

2018-04-15 21:01:03 +00:00
#!/bin/bash
set -e
source /etc/profile
echo 'Installing packages and upgrading'
PACKAGES=(net-misc/curl wget man-db openssh ca-certificates sudo)
2018-04-15 21:01:03 +00:00
echo "Installing additional packages: ${ADDPACKAGES}"
PACKAGES+=" ${ADDPACKAGES}"
ANSIBLE=${ANSIBLE:-0}
if [[ $ANSIBLE = 1 ]]; then
PACKAGES+=' ansible'
fi
CHEF=${CHEF:-0}
if [[ $CHEF = 1 ]]; then
echo "Chef installation isn't supported on Gentoo"
exit 1
fi
PUPPET=${PUPPET:-0}
if [[ $PUPPET = 1 ]]; then
PACKAGES+=' puppet'
fi
SALT=${SALT:-0}
if [[ $SALT = 1 ]]; then
PACKAGES+=' salt'
fi
# trying to set capabilities on an unprivileged container fails.
echo "*/* -filecaps" > /etc/portage/package.use/vagrant_overrides
2018-04-15 21:01:03 +00:00
emerge --sync
emerge --noreplace ${PACKAGES[*]}
emerge -uND @world
rc-config add sshd default