vagrant-lxc-base-boxes/centos/install-extras.sh

31 lines
657 B
Bash
Raw Normal View History

2014-09-24 15:16:20 +00:00
#!/bin/bash
set -e
source common/ui.sh
source common/utils.sh
info 'Installing extra packages and upgrading'
debug 'Bringing container up'
utils.lxc.start
# Sleep for a bit so that the container can get an IP
SECS=20
log "Sleeping for $SECS seconds..."
sleep $SECS
2014-09-24 15:16:20 +00:00
# install the fedora epel repo?
EPEL=${EPEL:-0}
2014-09-24 15:16:20 +00:00
# TODO: Support for appending to this list from outside
PACKAGES=(vim curl wget man ca-certificates sudo openssh-server)
if [ $EPEL = 1 ]; then
utils.lxc.attach yum update -y
utils.lxc.attach yum install epel-release -y
PACKAGES+=' bash-completion'
fi
utils.lxc.attach yum update -y
utils.lxc.attach yum install ${PACKAGES[*]} -y